/* ============================================================================
   CertWatch Design Tokens - "Control Plane" system
   Infrastructure aesthetic: mono-forward type, hairline rules, one cyan
   accent, square corners. No shadows, no gradients, no glows, no blur.
   Shared system with MXBastion (sibling product); accent differs per product.
   ============================================================================ */

:root {
  /* ========================================================================
   * SURFACES
   * ======================================================================== */

  /* Dark surfaces */
  --bg: #0b0e12;
  --bg-raised: #10141a;
  --bg-inset: #07090c;

  /* Paper surfaces (light sections) */
  --paper: #ebe8e0;
  --paper-raised: #f4f2ec;

  /* ========================================================================
   * TEXT
   * ======================================================================== */

  /* On dark */
  --text: #dddbd2;
  --text-heading: #f2f0e9;
  --text-muted: #9ba0a6;
  --text-faint: #686e76;

  /* On paper */
  --ink: #14181d;
  --ink-secondary: #3c434b;
  --ink-muted: #5d646d;

  /* ========================================================================
   * HAIRLINES
   * ======================================================================== */

  --line: rgba(221, 219, 210, 0.14);
  --line-strong: rgba(221, 219, 210, 0.32);
  --line-ink: rgba(20, 24, 29, 0.18);
  --line-ink-strong: rgba(20, 24, 29, 0.42);

  /* ========================================================================
   * ACCENT - signal cyan (single accent, used sparingly)
   * ======================================================================== */

  --accent: #33b3d6;
  --accent-bright: #55c4e4;
  --accent-dim: rgba(51, 179, 214, 0.12);

  /* ========================================================================
   * STATUS - desaturated technical tones
   * ======================================================================== */

  --ok: #69b583;
  --warn: #c9b458;
  --fail: #d96c5f;
  --info: #7fa6c9;

  --ok-dim: rgba(105, 181, 131, 0.1);
  --warn-dim: rgba(201, 180, 88, 0.1);
  --fail-dim: rgba(217, 108, 95, 0.08);
  --info-dim: rgba(127, 166, 201, 0.1);

  /* ========================================================================
   * LEGACY ALIASES - keep existing class hooks working
   * ======================================================================== */

  --ink-black: var(--bg);
  --prussian-blue: var(--bg-raised);
  --dusk-blue: var(--ink-muted);
  --dusty-denim: var(--text-muted);
  --alabaster-grey: var(--paper);

  --color-success: var(--ok);
  --color-warning: var(--warn);
  --color-danger: var(--fail);
  --color-info: var(--info);
  --cta: var(--accent);
  --cta-hover: var(--accent-bright);

  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --text-inverse: var(--bg);
  --text-link: var(--accent);

  --text-on-dark: var(--text);
  --text-on-dark-muted: var(--text-muted);
  --text-on-dark-subtle: var(--text-faint);

  --text-on-light: var(--ink);
  --text-on-light-secondary: var(--ink-secondary);
  --text-on-light-muted: var(--ink-muted);

  --bg-dark: var(--bg);
  --bg-dark-alt: var(--bg-raised);
  --bg-light: var(--paper);
  --bg-light-alt: var(--paper-raised);

  --border-dark: var(--line);
  --border-dark-hover: var(--line-strong);
  --border-light: var(--line-ink);

  /* ========================================================================
   * TYPOGRAPHY
   * ======================================================================== */

  --font-display: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Fluid sizes - restrained: mono reads wide, headlines stay moderate */
  --text-2xs: 0.6875rem;
  --text-xs: clamp(0.71875rem, 0.7rem + 0.1vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  --text-xl: clamp(1.1875rem, 1.1rem + 0.5vw, 1.375rem);
  --text-2xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --text-3xl: clamp(1.625rem, 1.35rem + 1.2vw, 2.25rem);
  --text-4xl: clamp(1.875rem, 1.5rem + 1.7vw, 2.75rem);
  --text-5xl: clamp(2.125rem, 1.6rem + 2.4vw, 3.375rem);

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;

  /* Weights - JetBrains Mono ships 400/500 only */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Letter spacing */
  --tracking-tighter: -0.04em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.14em;

  /* ========================================================================
   * SPACING - 8px base grid
   * ======================================================================== */

  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --section-padding-y: clamp(3rem, 6vw, 5rem);
  --container-padding-x: clamp(1rem, 5vw, 2rem);

  /* ========================================================================
   * LAYOUT
   * ======================================================================== */

  --container-max: 1200px;
  --container-narrow: 760px;
  --container-wide: 1440px;

  /* ========================================================================
   * BORDERS & RADIUS - square corners are the system
   * ======================================================================== */

  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-2xl: 0;
  --radius-full: 0;

  --border-width: 1px;

  /* ========================================================================
   * SHADOWS - none. Aliased to nothing so stale hooks render flat.
   * ======================================================================== */

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
  --shadow-2xl: none;
  --shadow-inner: none;

  /* ========================================================================
   * ANIMATION - fast and functional only
   * ======================================================================== */

  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;

  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.4, 0, 0.2, 1);

  /* ========================================================================
   * Z-INDEX SCALE
   * ======================================================================== */

  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Reduced motion - zero out durations */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
  }
}
