:root {
  /* Colors */
  --white: #FEFEFE;
  --grey: #F2F2F2;
  --black: #1D1D1D;
  --blue: #1A9BCC;
  --blue-dark: #1590b8;
  --orange: #EE9338;
  --green: #22c55e;
  --color-error: #dc2626;

  --bg: var(--white);
  --text: var(--black);
  --muted: rgba(29, 29, 29, 0.72);
  --muted-light: rgba(29, 29, 29, 0.22); /* Gap 3.3: intentionally de-emphasized step numbers (process-stack__num); lighter than --muted to recede visually until selected */
  --line: #D0D0D0;
  
  /*
    Spacing Scale (Swiss modular, 8px step)
    Allowed values: 8, 16, 24, 32, 48, 64, 80.
  */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;
  --section-padding-y: var(--space-3xl);
  --section-padding-y-mobile: 48px;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Responsive breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  
  /*
    Typography role mapping (Olympic/Swiss-inspired, neutral):
    - Display: --font-display (H1 / hero headlines only)
    - Core Sans: --font-sans (body, UI, nav, forms)
    - Serif Accent: --font-serif (optional, sparse callouts only)
  */
  --font-display: "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans: "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Times New Roman", Georgia, serif;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --lh-tight: 1.15;
  --lh-body: 1.6;
  --lh-ui: 1.4;

  --track-caps: 0.04em;
  --track-normal: 0;

  /* Single responsive type scale (base 16px, <= 8 sizes total) */
  --type-xs: 0.875rem; /* 14px minimum for critical small text */
  --type-body: 1rem;
  --type-ui: 1rem;
  --type-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  --type-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --type-h1: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);

  /* Legacy aliases for existing components (mapped to unified tokens) */
  --font-family: var(--font-sans);
  --font-size-caption: var(--type-xs);
  --font-size-body: var(--type-body);
  --font-size-label: var(--type-h3);
  --font-size-heading: var(--type-h2);
  --font-size-headline: var(--type-h1);
  --font-size-subtitle: var(--type-h3);
  --font-size-display: var(--type-h1);
  --line-height-normal: var(--lh-body);
  --line-height-display: var(--lh-tight);
  --line-height-heading: 1.25;
  --letter-spacing-tight: var(--track-caps);
  --letter-spacing-snug: var(--track-normal);
  --letter-spacing-normal: var(--track-normal);
  --letter-spacing-relaxed: var(--track-normal);
  --letter-spacing-wide: var(--track-normal);
}

* { 
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: var(--lh-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography hierarchy (semantic defaults) */
h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
}

h1 {
  font-family: var(--font-display);
  font-size: var(--type-h1);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-normal);
}

h2 {
  font-family: var(--font-sans);
  font-size: var(--type-h2);
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: var(--track-normal);
}

h3 {
  font-family: var(--font-sans);
  font-size: var(--type-h3);
  font-weight: var(--weight-medium);
  line-height: 1.3;
  letter-spacing: var(--track-normal);
}

h4, h5, h6 {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  letter-spacing: var(--track-normal);
}

p, li {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--track-normal);
}

p {
  margin-bottom: var(--space-md);
  max-width: 60ch;
}

/* Typography utility classes (mapped to semantic roles) */
.type-subtitle {
  font-family: var(--font-sans);
  font-size: var(--type-h3);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  letter-spacing: var(--track-normal);
}

.type-headline {
  font-family: var(--font-display);
  font-size: var(--type-h1);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-normal);
  text-transform: uppercase;
}

.type-heading {
  font-family: var(--font-sans);
  letter-spacing: var(--track-normal);
  text-transform: none;
}

h1.type-heading {
  font-family: var(--font-display);
  font-size: var(--type-h1);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}

h2.type-heading {
  font-size: var(--type-h2);
  font-weight: var(--weight-bold);
  line-height: 1.25;
}

h3.type-heading {
  font-size: var(--type-h3);
  font-weight: var(--weight-bold);
  line-height: 1.3;
}

.type-body {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--track-normal);
}

.muted {
  color: var(--muted);
}

.subhead {
  margin-top: var(--space-sm);
  max-width: 42ch;
  color: var(--muted);
}

/* Links and emphasis */
a { 
  color: var(--blue); 
  text-decoration: none;
  transition: opacity var(--transition-base);
}

a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

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

em {
  font-style: normal;
  font-weight: var(--weight-bold);
  color: var(--text);
}

/* Lists */
ul, ol {
  margin: 0;
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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