/* ==========================================================================
   Security Tech — design tokens
   Source of truth for the website and any HTML output (reports, slides).
   Pair with fonts.css. See BRAND-SPECIFICATION.md §5–§8.
   ========================================================================== */

:root {
  /* ---- Brand palette (fixed; never tint or blend) ---- */
  --st-ink:        #15191E;
  --st-point:      #0F5257;
  --st-point-dark: #5BBFC2;   /* replaces --st-point on ink grounds only */
  --st-graphite:   #4A525B;
  --st-paper:      #F6F6F4;
  --st-white:      #FFFFFF;
  --st-rule:       #B8BEC4;
  --st-rule-soft:  #E2E4E6;
  --st-ink-2:      #2A3038;   /* dark-theme surface, borders */
  --st-ink-3:      #1E242B;   /* dark-theme raised surface */

  /* ---- Severity (reports, dashboards). Always paired with a text label. ---- */
  --st-sev-critical: #7A1F1F;
  --st-sev-high:     #B4541A;
  --st-sev-medium:   #8A6D1E;
  --st-sev-low:      #2F6B8F;
  --st-sev-info:     #4A525B;

  /* ---- Semantic roles, light theme (default) ---- */
  --bg:            var(--st-paper);
  --bg-raised:     var(--st-white);
  --fg:            var(--st-ink);
  --fg-muted:      var(--st-graphite);
  --accent:        var(--st-point);
  --accent-fg:     var(--st-white);
  --border:        var(--st-rule-soft);
  --border-strong: var(--st-rule);
  --link:          var(--st-point);
  --link-hover:    var(--st-ink);
  --focus:         var(--st-point);
  --selection:     rgba(15, 82, 87, 0.18);

  /* ---- Type ---- */
  --font-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  --text-xs:   0.75rem;   /* 12px — mono labels only */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px — lead paragraphs */
  --text-lg:   1.5rem;    /* 24px — h3 */
  --text-xl:   2rem;      /* 32px — h2 */
  --text-2xl:  2.75rem;   /* 44px — h1 */
  --text-3xl:  3.75rem;   /* 60px — hero */

  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.55;
  --leading-mono:   1.7;

  --tracking-wordmark: 0.10em;   /* SECURITY TECH only */
  --tracking-label:    0.08em;   /* uppercase mono labels */
  --tracking-display:  -0.01em;  /* h1 and hero */

  /* ---- Spacing: 4px base, 8px rhythm ---- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;  --space-4: 1rem;
  --space-5: 1.5rem;   --space-6: 2rem;     --space-7: 3rem;     --space-8: 4rem;
  --space-9: 6rem;     --space-10: 8rem;

  /* ---- Layout ---- */
  --container: 1200px;
  --container-narrow: 720px;   /* long-form reading */
  --gutter: 1.5rem;
  --gutter-mobile: 1rem;

  /* ---- Shape: square is the brand. No rounded corners on brand elements. ---- */
  --radius-0: 0;
  --radius-ui: 2px;        /* inputs and buttons only; never on cards, images, or the mark */

  /* ---- Rules and emphasis ---- */
  --rule-weight: 1px;
  --rule-weight-strong: 2px;
  --bar: 4px;              /* the accent bar above a title (36–48px wide) */

  /* ---- Motion: minimal, functional ---- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 120ms;
  --duration: 200ms;
}

/* ---- Dark theme: the ink ground. The point lifts to the lighter teal. ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            var(--st-ink);
    --bg-raised:     var(--st-ink-3);
    --fg:            var(--st-paper);
    --fg-muted:      var(--st-rule);
    --accent:        var(--st-point-dark);
    --accent-fg:     var(--st-ink);
    --border:        var(--st-ink-2);
    --border-strong: var(--st-graphite);
    --link:          var(--st-point-dark);
    --link-hover:    var(--st-paper);
    --focus:         var(--st-point-dark);
    --selection:     rgba(91, 191, 194, 0.25);
  }
}
:root[data-theme="dark"] {
  --bg:            var(--st-ink);
  --bg-raised:     var(--st-ink-3);
  --fg:            var(--st-paper);
  --fg-muted:      var(--st-rule);
  --accent:        var(--st-point-dark);
  --accent-fg:     var(--st-ink);
  --border:        var(--st-ink-2);
  --border-strong: var(--st-graphite);
  --link:          var(--st-point-dark);
  --link-hover:    var(--st-paper);
  --focus:         var(--st-point-dark);
  --selection:     rgba(91, 191, 194, 0.25);
}
