/* ============================================================================
   Hydrira: Design Tokens. "Civic Utility"
   Light, airy and plain-spoken: written for municipal buyers, operators and
   procurement officers. White page, pale-sky bands, deep reservoir navy.
   Palette from logo/LOGO_RESEARCH.md: raw-water navy #0B3A66, membrane bars
   #1B7FC4, clean-water aqua #35D0C0, wordmark ink #0B2E4F.
   Variable names from the previous system are kept so every page resolves.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- Surfaces ---- */
  --bg-base:   #ffffff;          /* the page: tap-water white */
  --bg-900:    #0b2e4f;          /* reservoir navy: footer, deep bands */
  --bg-800:    #0f3a61;
  --sky:       #eef6fc;          /* pale-sky band */
  --sky-2:     #e1eef8;
  --surface-1: #ffffff;
  --surface-2: #f3f8fc;
  --surface-3: #e4eff8;
  --canvas:    #f7fbfe;

  /* ---- Text (all AA on white and on --sky) ---- */
  --text-primary:   #0b2e4f;     /* 13.3:1 on white */
  --text-secondary: #2c4762;     /* 9.6:1 */
  --text-muted:     #4b6580;     /* 6.0:1 */
  --text-faint:     #566e87;     /* 5.3:1 */
  --text-on-accent: #ffffff;
  --text-on-deep:   #e8f3fa;
  --text-on-deep-muted: #b6cde0;

  /* ---- Lines ---- */
  --border-subtle:  #dbe8f3;
  --border-default: #c4d8e9;
  --border-strong:  #8fb3d1;     /* 3:1 non-text on white for controls */
  --grid-line:      #e6f0f8;
  --ring:           #1565a8;
  --ripple:         #9fcbe9;     /* ripple-line motif */
  --ripple-soft:    #cfe5f5;

  /* ---- Brand (the mark) ---- */
  --brand-raw:   #0b3a66;
  --brand-bar:   #1b7fc4;
  --brand-clean: #35d0c0;
  --clean-ink:   #0b6f66;        /* aqua dark enough for text, 5.9:1 */
  --raw-water:   #8a7b5c;        /* turbid intake colour, used in the train pipe */

  /* ---- Accent: actions are reservoir navy, links are membrane blue ---- */
  --accent:       #0b3a66;
  --accent-hover: #134c82;
  --accent-press: #082b4d;
  --accent-soft:  #dcebf7;
  --link:         #1565a8;       /* 6.0:1 on white */
  --link-hover:   #0b3a66;

  /* ---- Status (always paired with glyph + text label) ---- */
  --st-queued:  #4b6580;  --st-queued-soft:  #edf2f7;
  --st-running: #1565a8;  --st-running-soft: #e3effa;
  --st-waiting: #1b6fa8;  --st-waiting-soft: #e3f0f9;
  --st-approve: #8f560a;  --st-approve-soft: #fbf0dc;
  --st-success: #0b6f66;  --st-success-soft: #ddf3f0;
  --st-failed:  #b4123a;  --st-failed-soft:  #fbe4ea;
  --st-blocked: #8f1a3c;  --st-blocked-soft: #f6e3ea;

  /* ---- Product marks (from products_raw/*/logo-brief.md) ---- */
  --prod-coagen:  #0e7c86;
  --prod-aerix:   #1c8fe0;
  --prod-membraq: #0b6e5f;
  --prod-turbix:  #2563c9;
  --prod-simflo:  #3b5bdb;
  --prod-permia:  #0f4c81;

  /* ---- Diagrams ---- */
  --node-bg:     #ffffff;
  --node-border: var(--border-default);
  --node-active: var(--brand-bar);
  --edge:        #a9c4da;
  --edge-active: #1b7fc4;
  --edge-wrap:   #6fa3cc;
  --run-done:    #7ccdc3;

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

  /* ---- Type ----
     Public Sans: the open, neutral typeface of public-sector websites. It
     carries every heading and paragraph. Atkinson Hyperlegible Mono, drawn
     for low-vision readers, carries readings, tags and tool names. */
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Larger reading sizes than a typical product site: base is 18px. */
  --fs-display: clamp(2.5rem, 1.5rem + 4.2vw, 4.5rem);
  --fs-h1:      clamp(2.25rem, 1.6rem + 2.6vw, 3.375rem);
  --fs-h2:      clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
  --fs-h3:      clamp(1.3125rem, 1.15rem + 0.6vw, 1.625rem);
  --fs-h4:      clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-lead:    clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --fs-body:    1.125rem;
  --fs-body-lg: 1.25rem;
  --fs-small:   1rem;
  --fs-mono:    0.9375rem;
  --fs-micro:   0.875rem;
  --fs-metric:  clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-price:   clamp(2.25rem, 1.8rem + 2vw, 3.25rem);

  /* ---- Spacing: 4-pt base ---- */
  --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: soft, signage-like. Hierarchy: chips < controls < panels < bands ---- */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 28px;
  --radius-pill: 999px;

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

  /* ---- Rhythm: airy ---- */
  --section-y:    clamp(64px, 7vw, 112px);
  --section-y-lg: clamp(80px, 9vw, 144px);
  --nav-h: 72px;

  --panel-gap:  clamp(16px, 1.8vw, 24px);
  --panel-pad:  clamp(20px, 2.2vw, 32px);
  --log-line-y: 6px;
  --node-pad:   var(--space-3) var(--space-4);
  --step-gap:   var(--space-6);
  --stack:      clamp(14px, 1.6vw, 22px);

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

  /* ---- Elevation: one soft lift for overlays only ---- */
  --hairline: 1px solid var(--border-subtle);
  --shadow-1: 0 1px 2px rgba(11, 46, 79, 0.06);
  --shadow-2: 0 8px 24px rgba(11, 46, 79, 0.10);
  --shadow-3: 0 18px 48px rgba(11, 46, 79, 0.16);
  --scrim:    rgba(11, 46, 79, 0.42);

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