/* SuccessPath design tokens — v5 (Plex typography)
 * Direction: navy/blue institutional trust, Apple/Google-grade minimalism.
 * Typography: IBM Plex Sans + IBM Plex Mono, SELF-HOSTED in /fonts/ —
 * the same faces as our research reports, with zero third-party requests
 * (privacy story intact: no font CDN, no tracking).
 * Teal survives only as a quarantined data-viz accent; green never leads.
 * All text pairs ≥ WCAG AA 4.5:1 (computed via WCAG 2.1 relative luminance). */

/* ---- Self-hosted typefaces ---- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts-plex-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts-plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts-plex-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts-plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  /* ---- Color ---- */
  --bg: #f7f9fc;            /* cool porcelain page */
  --bg-soft: #edf1f7;       /* whisper-of-blue section tint */
  --surface: #ffffff;

  --ink: #131c2e;           /* near-black, navy undertone — 16.1:1 on --bg */
  --ink-soft: #3b475c;      /* 8.9:1 on --bg */
  --muted: #5a6b82;         /* 5.2:1 on --bg */
  --faint: #66758c;         /* 4.7:1 on --surface — use on white surfaces only */
  --line: #dee4ed;          /* cool hairline */
  --line-soft: #e9eef5;

  --brand: #1d4ed8;         /* institutional blue — 6.7:1 white-on-brand */
  --brand-deep: #1a45b8;    /* hover — 8.1:1 white-on-deep */
  --brand-ink: #0f1e38;     /* true navy for dark bands — 16.6:1 white-on-band */
  --brand-soft: #e4ebfa;    /* blue-tinted fills */
  --brand-ring: rgba(29, 78, 216, 0.28);

  --accent-teal: #0e7e88;   /* desaturated, blue-leaning — viz + pills only, 4.8:1 */
  --accent-teal-soft: #e2f1f3;

  --success: #2e7d32;       /* 5.1:1 on white — success semantics only */
  --success-soft: #e5f2e9;
  --warn: #b45309;          /* 5.0:1 on white — warnings/flags */
  --warn-soft: #fdf1dc;
  --danger: #c2410c;        /* 5.2:1 on white */

  /* Data-viz hues — one per dimension; panels are single-hue */
  --dim-wiring: #1d4ed8;    /* brand blue — the flagship dimension */
  --dim-interests: #b45309; /* warm amber — "energy" reads warm */
  --dim-values: #7c5cbf;    /* violet — cool, trustworthy, distinct */
  --dim-needs: #0e7e88;     /* teal accent — the only green-adjacent hue */

  /* ---- Type ---- */
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  --font-display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;   /* 17px — comfortable reading */
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;
  --text-4xl: clamp(2.75rem, 6vw, 4.75rem);

  --leading-tight: 1.04;
  --leading-snug: 1.3;
  --leading-body: 1.6;

  /* ---- Spacing ---- */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s8: 2rem;
  --s10: 2.5rem;
  --s12: 3rem;
  --s16: 4rem;
  --s20: 5rem;
  --s24: 6rem;

  /* ---- Shape ---- */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;

  /* ---- Elevation (soft, layered) ---- */
  --shadow-sm: 0 1px 2px rgba(19, 28, 46, 0.05);
  --shadow: 0 1px 3px rgba(19, 28, 46, 0.06), 0 8px 24px rgba(19, 28, 46, 0.07);
  --shadow-lg: 0 2px 6px rgba(19, 28, 46, 0.06), 0 20px 48px rgba(19, 28, 46, 0.12);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 0.18s;

  /* ---- Layout ---- */
  --maxw: 72rem;
  --maxw-narrow: 44rem;
  --maxw-read: 38rem;
  --maxw-article: 42rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--ink);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type hierarchy — editorial display: tight tracking, short leading */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  margin: 0 0 var(--s4);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); letter-spacing: -0.04em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.032em; }
h3 { font-size: var(--text-xl); letter-spacing: -0.022em; }
h4 { font-size: var(--text-lg); letter-spacing: -0.015em; }

p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-deep); }

small, .small { font-size: var(--text-sm); color: var(--muted); }
.lead { font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--ink-soft); }

/* Numeric stability for counters / scores / prices */
.tnum { font-variant-numeric: tabular-nums; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s6); }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 var(--s6); }
.wrap-read { max-width: var(--maxw-read); margin: 0 auto; padding: 0 var(--s6); }
/* One content width for the article pages (how-it-works, transparency,
   terms, privacy, support, contact): 42rem everywhere, hero included,
   so the text column never changes width between pages. */
.wrap-article { max-width: var(--maxw-article); margin: 0 auto; padding: 0 var(--s6); }
/* Section rhythm (go-live polish, Nov 28): one uniform gap everywhere.
   Sections and heroes use 4rem (s16) top and bottom on desktop, 3rem (s12)
   on small screens. Head-to-content gaps are 2.5rem (s10) throughout. */
.section { padding: var(--s16) 0; }
.section-soft { background: var(--bg-soft); }

.center { text-align: center; }

/* Eyebrow — mono kickers, brand-tinted (amber reserved for warnings) */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
  text-align: center;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid #c9d6f2;
  padding: var(--s1) var(--s4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--s5);
}
.eyebrow .icon { width: 0.95rem; height: 0.95rem; }

/* Inline SVG icon system */
.icon {
  width: 1.3em;
  height: 1.3em;
  flex: none;
  vertical-align: -0.22em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.fill { fill: currentColor; stroke: none; }

/* Accessible focus — visible everywhere */
:focus-visible {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection { background: var(--brand-soft); }

img, svg { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
