/* ==========================================================================
   CSTx Design System — Colors & Type
   Brand colors and typographic tokens extracted from CSTx corporate materials
   ========================================================================== */

/* IBM Plex Sans (primary brand typeface). Self-hosted from /fonts/.
   The CSTx deck uses "IBM Plex Sans Light" (weight 300) as the default. */

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Thin.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 100;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-ThinItalic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-ExtraLight.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 200;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-ExtraLightItalic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Light.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-LightItalic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-MediumItalic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-SemiBoldItalic.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexSans-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  src: url("fonts/IBMPlexSans-BoldItalic.ttf") format("truetype");
}

/* IBM Plex Mono — self-hosted for offline use. */
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
}

:root {
  /* --------------------------------------------------------------------------
     COLORS
     -------------------------------------------------------------------------- */

  /* Brand red — the signature CSTx accent. Used for the X-logo plaque,
     emphasis underlines, accent rules, and selected/active states. */
  --cstx-red:        #DD0B2F;
  --cstx-red-dark:   #B30822;   /* hover / pressed for red surfaces */
  --cstx-red-soft:   #FBE6EA;   /* very light tint for backgrounds */

  /* Neutrals — taken directly from the deck's color usage. The brand
     is almost entirely red + grayscale, no secondary hue. */
  --ink:             #000000;   /* primary text on light */
  --ink-2:           #595959;   /* secondary text, headings on light */
  --ink-3:           #837C7B;   /* tertiary text, icon fill, captions */
  --ink-4:           #A59C9C;   /* placeholder / disabled text */
  --rule:            #CDC9C8;   /* hairline rule, divider, faint border */
  --surface-2:       #F2F1F0;   /* alt surface (cards on white) */
  --surface:         #FFFFFF;   /* primary surface */
  --surface-dark:    #1C1C1C;   /* dark surface for inverted layouts */

  /* Semantic tokens — map foundation values to roles. Prefer these in app code. */
  --fg-1:            var(--ink);          /* primary text */
  --fg-2:            var(--ink-2);        /* secondary text */
  --fg-3:            var(--ink-3);        /* tertiary / metadata */
  --fg-muted:        var(--ink-4);        /* disabled / hint */
  --fg-on-red:       #FFFFFF;             /* text on red surfaces */
  --bg-1:            var(--surface);
  --bg-2:            var(--surface-2);
  --bg-dark:         var(--surface-dark);
  --border:          var(--rule);
  --accent:          var(--cstx-red);
  --accent-hover:    var(--cstx-red-dark);
  --link:            var(--cstx-red);
  --link-hover:      var(--cstx-red-dark);

  /* Status colors (derived; not used heavily in source materials — kept muted
     to fit the restrained CSTx palette). Flag for review. */
  --status-success:  #2E7D32;
  --status-warning:  #C77700;
  --status-danger:   var(--cstx-red);
  --status-info:     #2A6FDB;

  /* --------------------------------------------------------------------------
     TYPOGRAPHY
     -------------------------------------------------------------------------- */

  --font-sans:   "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:   "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "IBM Plex Sans", system-ui, sans-serif;

  /* Weights. CSTx leans heavy on Light (300). Headings use Regular (400)
     or Semibold (600). Bold (700) is rare. */
  --w-light:     300;
  --w-regular:   400;
  --w-medium:    500;
  --w-semibold:  600;
  --w-bold:      700;

  /* Type scale — based on slide-typography measurements and a normal
     web 1rem = 16px baseline. */
  --t-display:   clamp(40px, 5vw, 72px);   /* slide titles, hero */
  --t-h1:        40px;
  --t-h2:        28px;
  --t-h3:        22px;
  --t-h4:        18px;
  --t-body:      16px;
  --t-body-sm:   14px;
  --t-caption:   12px;
  --t-overline:  11px;

  /* Line heights */
  --lh-tight:    1.15;
  --lh-snug:     1.3;
  --lh-normal:   1.5;
  --lh-loose:    1.7;

  /* Letter spacing */
  --ls-tight:   -0.01em;
  --ls-normal:   0;
  --ls-wide:     0.04em;
  --ls-overline: 0.12em;

  /* --------------------------------------------------------------------------
     SPACING, RADII, SHADOWS
     -------------------------------------------------------------------------- */

  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;

  /* Radii — the CSTx logo plaque uses a soft ~12px corner; cards mirror it. */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* Borders */
  --bw-1: 1px;
  --bw-2: 2px;
  --bw-accent: 3px;   /* the red accent rule used under headings */

  /* Shadows — restrained, subtle. The brand is flat-ish; avoid heavy blurs. */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --shadow-2: 0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-3: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-red: 0 6px 18px rgba(221, 11, 47, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
}

/* ============================================================================
   SEMANTIC ELEMENT STYLES
   Drop this stylesheet into a page and these defaults apply.
   ============================================================================ */

html, body {
  font-family: var(--font-sans);
  font-weight: var(--w-light);
  color: var(--fg-1);
  background: var(--bg-1);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg-1);
  line-height: var(--lh-snug);
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); font-weight: var(--w-light); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--t-h2); font-weight: var(--w-regular); }
h3 { font-size: var(--t-h3); font-weight: var(--w-regular); }
h4 { font-size: var(--t-h4); font-weight: var(--w-semibold); }

/* The CSTx slide-title pattern: large light-weight heading with a short
   red underline rule below it. Available as utility class .cstx-title. */
.cstx-title {
  font-size: var(--t-h1);
  font-weight: var(--w-light);
  color: var(--fg-1);
  position: relative;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-5);
}
.cstx-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px;
  height: var(--bw-accent);
  background: var(--accent);
}

p { margin: 0 0 var(--s-4); text-wrap: pretty; }

small, .caption { font-size: var(--t-caption); color: var(--fg-3); }

.overline {
  font-size: var(--t-overline);
  text-transform: uppercase;
  letter-spacing: var(--ls-overline);
  color: var(--fg-3);
  font-weight: var(--w-medium);
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code {
  background: var(--bg-2);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }

::selection { background: var(--cstx-red); color: #fff; }
