/* =============================================================================
   Institute Success — Brand Tokens
   v1.0 · 2026-05-06
   Single source of truth for colors, typography, spacing, radius, motion.
   Drop-in via:  <link rel="stylesheet" href="brand-tokens.css">
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1 · Brand colors  (constant across light/dark — never override)
   -------------------------------------------------------------------------- */
:root {
  /* Primary palette · Brandbook v13 §Color */
  --is-blue:         #00A3E0;  /* primary action, icons, accents */
  --is-dark:         #1A2B4A;  /* canonical body-text color (replaces pure black brand-wide) */
  --is-black:        #1D1D1D;  /* legacy brand black — no longer used for text; see --is-dark */
  --is-white:        #FFFFFF;
  --is-light-gray:   #EAEBEC;

  /* Secondary palette · Brandbook v13 §Color */
  --is-cool-gray:    #63666A;
  --is-blue-sky:     #385E9D;  /* a.k.a. "IS Sky" in the Engaged Leader system */
  --is-green:        #78D64B;  /* success */
  --is-lime:         #D4EB8E;
  --is-sunrise:      #FFF980;
  --is-fuschia:      #E70756;  /* error / alert (spelled "IS Fuchsia" in EL docs) */

  /* DISC behavioral colors · used in assessment pages */
  --disc-d: #E4054C;  /* Decisive */
  --disc-i: #F4BB00;  /* Interactive */
  --disc-s: #00B126;  /* Stabilizing */
  --disc-c: #00B3E8;  /* Cautious */

  /* Spranger Values colors · used in values-driven pages */
  --val-aes: #94C349;  /* Aesthetic */
  --val-eco: #366EB2;  /* Economic */
  --val-ind: #E8863D;  /* Individualistic */
  --val-pol: #C1272D;  /* Political */
  --val-alt: #F7C241;  /* Altruistic */
  --val-reg: #808285;  /* Regulatory */
  --val-the: #A67C52;  /* Theoretical */

  /* ---- Engaged Leader™ system (scope: Engaged Leader Program / Profile / courses) ---- */

  /* EL-scoped accent colors — NOT part of the core Institute Success palette.
     Use only on Engaged Leader assets. Amber & Violet exist to back two dimensions. */
  --is-orange: #F7941D;  /* warmth, featured / coming-soon, coaching */
  --is-amber:  #F5A623;  /* Decision-Making dimension only */
  --is-violet: #7B3FA0;  /* Self-Leadership dimension only */

  /* Layer 3 — 6 Leadership Dimension colors (full / light tint / text-on-white) */
  --dim-strategic:  #385E9D;  --dim-strategic-tint:  #E8EDF5;  --dim-strategic-text:  #2A4A7D;  /* Strategic Thinking & Vision (= IS Sky) */
  --dim-people:     #78D64B;  --dim-people-tint:     #EEF9E6;  --dim-people-text:     #3D7A1E;  /* People Development & Empowerment */
  --dim-decisions:  #F5A623;  --dim-decisions-tint:  #FEF5E5;  --dim-decisions-text:  #B07A0A;  /* Decision-Making & Accountability */
  --dim-influence:  #00A3E0;  --dim-influence-tint:  #E5F5FB;  --dim-influence-text:  #007AAA;  /* Influence & Communication (= IS Blue) */
  --dim-self:       #7B3FA0;  --dim-self-tint:       #F1EBF8;  --dim-self-text:       #5C2F80;  /* Self-Leadership & Character */
  --dim-execution:  #E70756;  --dim-execution-tint:  #FCE5ED;  --dim-execution-text:  #B3053F;  /* Execution & Results */
}

/* -----------------------------------------------------------------------------
   2 · Surface / text tokens — flip between light & dark mode
   Default: DARK MODE (matches gold-standard pages)
   -------------------------------------------------------------------------- */
:root {
  --bg:           #0d1117;  /* page background */
  --surface:      #161b22;  /* card / panel */
  --surface-alt:  #1c2128;  /* nested card / hover */
  --border:       #30363d;
  --border-soft:  rgba(255,255,255,.06);

  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-faint:   #6e7681;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.4);

  /* Logo source — swapped in light mode */
  --logo-src: url("/images/logo_rev.png");
}

/* Light mode — applied via [data-theme="light"] OR .light-mode body class */
[data-theme="light"], body.light-mode {
  --bg:           #EAEBEC;
  --surface:      #FFFFFF;
  --surface-alt:  #F5F7F9;
  --border:       #D1D5DB;
  --border-soft:  rgba(0,0,0,.06);

  --text:         #1A2B4A;  /* IS Dark — canonical body text (never pure black) */
  --text-muted:   #63666A;
  --text-faint:   #9CA3AF;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);

  --logo-src: url("/images/logo.png");
}

/* Auto dark/light via OS preference if no explicit theme set */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:           #EAEBEC;
    --surface:      #FFFFFF;
    --surface-alt:  #F5F7F9;
    --border:       #D1D5DB;
    --border-soft:  rgba(0,0,0,.06);
    --text:         #1A2B4A;  /* IS Dark — canonical body text (never pure black) */
    --text-muted:   #63666A;
    --text-faint:   #9CA3AF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
    --logo-src: url("/images/logo.png");
  }
}

/* -----------------------------------------------------------------------------
   3 · Typography
   Aller (display headings, all caps)
   Montserrat (body, subheads, UI)
   JetBrains Mono (code, tabular)
   -------------------------------------------------------------------------- */
:root {
  --font-display: 'Aller', 'Aller Display', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale */
  --fs-display: 56px;
  --fs-h1:      40px;
  --fs-h2:      30px;
  --fs-h3:      22px;
  --fs-h4:      18px;
  --fs-lead:    17px;
  --fs-body:    16px;
  --fs-small:   14px;
  --fs-eyebrow: 12px;
  --fs-code:    14px;

  /* Line heights */
  --lh-display: 1.05;
  --lh-h1:      1.10;
  --lh-h2:      1.15;
  --lh-h3:      1.25;
  --lh-h4:      1.35;
  --lh-body:    1.55;
  --lh-tight:   1.40;
}

/* -----------------------------------------------------------------------------
   4 · Spacing (4px baseline → 8px primary scale)
   -------------------------------------------------------------------------- */
:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
}

/* -----------------------------------------------------------------------------
   5 · Border radius
   -------------------------------------------------------------------------- */
:root {
  --radius-sm:   4px;   /* badges, pills */
  --radius-md:   6px;   /* buttons */
  --radius-lg:   8px;   /* inputs, alerts */
  --radius-xl:   12px;  /* small cards */
  --radius-2xl:  16px;  /* default card */
  --radius-3xl:  24px;  /* hero panels */
  --radius-pill: 9999px;
}

/* -----------------------------------------------------------------------------
   6 · Layout / containers
   -------------------------------------------------------------------------- */
:root {
  --container-max: 1140px;
  --container-pad: 16px;     /* mobile gutter */
  --container-pad-md: 24px;  /* tablet+ */
  --header-h: 64px;
  --nav-h:    48px;
  --z-base: 1;
  --z-nav: 20;
  --z-header: 30;
  --z-overlay: 40;
  --z-modal: 50;
  --z-toast: 60;
}

/* -----------------------------------------------------------------------------
   7 · Motion
   -------------------------------------------------------------------------- */
:root {
  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  400ms;
  --ease:      cubic-bezier(.2, .7, .3, 1);
}

/* =============================================================================
   GLOBAL RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 400; /* Aller is already heavy; let the face do the work */
  margin: 0 0 var(--space-4);
  color: var(--text);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }

h3, h4, h5, h6 {
  font-family: var(--font-body);
  margin: 0 0 var(--space-3);
  color: var(--text);
}
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }

p { margin: 0 0 var(--space-4); }
a { color: var(--is-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: var(--fs-code);
}
code {
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

img { max-width: 100%; display: block; }

::selection { background: var(--is-blue); color: white; }

:focus-visible {
  outline: 2px solid var(--is-blue);
  outline-offset: 2px;
}

/* =============================================================================
   COMPONENT CLASSES
   ========================================================================== */

/* Container ----------------------------------------------------------------- */
.is-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
@media (min-width: 768px) {
  .is-container {
    padding-left: var(--container-pad-md);
    padding-right: var(--container-pad-md);
  }
}

/* Eyebrow ------------------------------------------------------------------- */
.is-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--is-blue);
}

/* Lead ---------------------------------------------------------------------- */
.is-lead {
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

/* Buttons ------------------------------------------------------------------- */
.is-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.is-btn:hover { transform: translateY(-1px); text-decoration: none; }
.is-btn:active { transform: translateY(0); }

.is-btn--primary {
  background: var(--is-blue);
  color: white;
}
.is-btn--primary:hover { background: #0094cc; }

.is-btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.is-btn--secondary:hover { background: var(--surface-alt); border-color: var(--is-blue); }

.is-btn--ghost {
  background: transparent;
  color: var(--is-blue);
}
.is-btn--ghost:hover { background: var(--surface-alt); }

.is-btn--danger {
  background: var(--is-fuschia);
  color: white;
}

.is-btn--sm { padding: 8px 14px; font-size: 13px; }
.is-btn--lg { padding: 14px 22px; font-size: 15px; }

.is-btn svg, .is-btn [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }

/* Card ---------------------------------------------------------------------- */
.is-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
}
.is-card--alt { background: var(--surface-alt); }
.is-card--accent {
  border-left: 4px solid var(--is-blue);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.is-card--feature {
  background: var(--surface);
  padding: var(--space-6);
  border-radius: var(--radius-3xl);
}

/* Callout / quote ----------------------------------------------------------- */
.is-callout {
  border-left: 4px solid var(--is-blue);
  background: rgba(0, 163, 224, 0.08);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--space-5) 0;
}
.is-callout--success { border-color: var(--is-green); background: rgba(120, 214, 75, 0.08); }
.is-callout--alert  { border-color: var(--is-fuschia); background: rgba(231, 7, 86, 0.08); }
.is-callout--info   { border-color: var(--is-blue-sky); background: rgba(56, 94, 157, 0.10); }

/* Badge / pill -------------------------------------------------------------- */
.is-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 163, 224, 0.15);
  color: var(--is-blue);
}
.is-badge--neutral { background: var(--surface-alt); color: var(--text-muted); }
.is-badge--success { background: rgba(120,214,75,.15); color: var(--is-green); }
.is-badge--alert   { background: rgba(231,7,86,.15); color: var(--is-fuschia); }
.is-badge--solid   { background: var(--is-blue); color: white; }

/* Eyebrow tag (filled) ------------------------------------------------------ */
.is-tag {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--is-blue);
  color: white;
  border-radius: var(--radius-sm);
}

/* Inputs -------------------------------------------------------------------- */
.is-input, .is-textarea, .is-select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.4;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease);
}
.is-input:focus, .is-textarea:focus, .is-select:focus {
  outline: none;
  border-color: var(--is-blue);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.18);
}
.is-textarea { min-height: 96px; resize: vertical; }

.is-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

/* Divider ------------------------------------------------------------------- */
.is-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-6) 0;
}

/* Header / nav -------------------------------------------------------------- */
.is-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.is-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  min-height: var(--header-h);
}
.is-header__logo {
  height: 32px;
  width: auto;
  content: var(--logo-src);
}
.is-header__nav {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.is-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.is-nav-link:hover, .is-nav-link.is-active {
  color: var(--text);
  background: var(--surface-alt);
}

/* Footer -------------------------------------------------------------------- */
.is-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: var(--space-8);
  padding: var(--space-6) 0;
}
.is-footer__inner {
  text-align: center;
}
.is-footer__brand {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--is-blue);
}
.is-footer__tagline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.is-footer__meta {
  margin-top: var(--space-3);
  font-size: 11px;
  color: var(--text-faint);
}

/* Hero ---------------------------------------------------------------------- */
.is-hero {
  padding: var(--space-8) 0 var(--space-7);
}
.is-hero__title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-family: var(--font-display);
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
  letter-spacing: 0.01em;
}
.is-hero__lede {
  max-width: 720px;
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 var(--space-5);
}

/* Breadcrumb / back link ---------------------------------------------------- */
/* Canonical "Back to …" link for detail pages. Always renders on its own line
   (block-level flex) sized to its content, positioned inside the page's content
   container so it aligns with the eyebrow/title beneath it. */
.is-breadcrumb,
.back-link {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0 var(--space-5);
  transition: color 150ms ease;
}
.is-breadcrumb:hover,
.back-link:hover {
  color: var(--is-blue);
  text-decoration: none;
}
.is-breadcrumb svg, .is-breadcrumb [data-lucide],
.back-link svg, .back-link [data-lucide] {
  width: 15px;
  height: 15px;
}

/* Feature grid -------------------------------------------------------------- */
.is-grid { display: grid; gap: var(--space-4); }
.is-grid--2 { grid-template-columns: 1fr; }
.is-grid--3 { grid-template-columns: 1fr; }
.is-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .is-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .is-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .is-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .is-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Icon helpers -------------------------------------------------------------- */
[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  vertical-align: middle;
}
.is-icon-xs  [data-lucide] { width: 12px; height: 12px; }
.is-icon-sm  [data-lucide] { width: 16px; height: 16px; }
.is-icon-md  [data-lucide] { width: 20px; height: 20px; }
.is-icon-lg  [data-lucide] { width: 24px; height: 24px; }
.is-icon-xl  [data-lucide] { width: 32px; height: 32px; }
.is-icon-2xl [data-lucide] { width: 48px; height: 48px; }

/* List with icon bullets ---------------------------------------------------- */
.is-list { list-style: none; padding: 0; margin: 0; }
.is-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}
.is-list li [data-lucide] {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--is-blue);
  width: 18px;
  height: 18px;
}

/* Print --------------------------------------------------------------------- */
@media print {
  body { background: white; color: black; }
  .no-print { display: none !important; }
}
