/* =============================================================
   IPMA — THE ARCHITECT'S BLUEPRINT
   Shared Design System
   ============================================================= */

/* =============================================================
   DESIGN TOKENS
   ============================================================= */
:root {
  /* Backgrounds */
  --bg-deep: #080E18;
  --bg-primary: #0C1A2A;
  --bg-elevated: #122236;
  --bg-card: #1A2E44;
  --bg-glass: rgba(18, 34, 54, 0.85);

  /* Structural Colors */
  --steel-blue: #1B3A4B;
  --steel-light: #2A4F63;
  --steel-dark: #0F2533;
  --orange: #E07A2F;
  --orange-light: #F5A623;
  --orange-dim: rgba(224, 122, 47, 0.2);
  --cyan: #5A7D8C;
  --cyan-dim: rgba(90, 125, 140, 0.25);

  /* Status */
  --success: #4A8C5E;
  --success-glow: rgba(74, 140, 94, 0.5);
  --error: #C0392B;
  --gold: #D4901A;
  --gold-glow: rgba(212, 144, 26, 0.5);

  /* Warm Tones */
  --warm-1: #F5C77E;
  --warm-2: #E8A84C;
  --warm-3: #C4872A;
  --warm-glow: rgba(245, 199, 126, 0.5);
  --warm-glow-soft: rgba(245, 199, 126, 0.15);
  --wood: rgba(140, 100, 60, 0.45);
  --wood-dark: rgba(100, 70, 40, 0.35);

  /* Text */
  --text-primary: #FAFAF8;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.45);
  --drafting: #D6CFC7;

  /* Borders & Surfaces */
  --border-subtle: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.12);
  --surface-hover: rgba(255,255,255,0.05);
  --surface-dim: rgba(255,255,255,0.03);
  --surface-bar: rgba(255,255,255,0.1);
  --shadow-card: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
  --hero-grad-mid: rgba(8, 14, 24, 0.7);
  --hero-grad-soft: rgba(8, 14, 24, 0.3);
  --hero-grad-top: rgba(8, 14, 24, 0.15);
  --grid-line: rgba(90, 125, 140, 0.035);
  --callout-bg: rgba(224, 122, 47, 0.04);
  --callout-exam-bg: rgba(212, 144, 26, 0.06);
  --callout-prac-bg: rgba(90, 125, 140, 0.06);

  /* Typography */
  --font-display: 'DM Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Animation */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);
}

/* =============================================================
   LIGHT THEME
   ============================================================= */
[data-theme="light"] {
  --bg-deep: #F0F2F5;
  --bg-primary: #FFFFFF;
  --bg-elevated: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --steel-blue: #C8D6E0;
  --steel-light: #8CA0B0;
  --steel-dark: #D8E2EA;
  --orange: #C96A1F;
  --orange-light: #A87018;
  --orange-dim: rgba(201, 106, 31, 0.1);
  --cyan: #4A6E7C;
  --cyan-dim: rgba(74, 110, 124, 0.1);

  --success: #3A7A4E;
  --success-glow: rgba(58, 122, 78, 0.25);
  --error: #B83224;
  --gold: #B07A15;
  --gold-glow: rgba(176, 122, 21, 0.25);

  --warm-1: #9A7038;
  --warm-2: #B07A15;
  --warm-3: #8A5E18;
  --warm-glow: rgba(154, 112, 56, 0.25);
  --warm-glow-soft: rgba(154, 112, 56, 0.08);
  --wood: rgba(180, 140, 90, 0.15);
  --wood-dark: rgba(140, 100, 60, 0.1);

  --text-primary: #1A1A2E;
  --text-secondary: rgba(0,0,0,0.62);
  --text-muted: rgba(0,0,0,0.4);
  --drafting: #3A3A4A;

  --border-subtle: rgba(0,0,0,0.06);
  --border-medium: rgba(0,0,0,0.1);
  --border-strong: rgba(0,0,0,0.15);
  --surface-hover: rgba(0,0,0,0.04);
  --surface-dim: rgba(0,0,0,0.02);
  --surface-bar: rgba(0,0,0,0.06);
  --shadow-card: rgba(0, 0, 0, 0.06);
  --shadow-heavy: rgba(0, 0, 0, 0.12);
  --hero-grad-mid: rgba(240, 242, 245, 0.75);
  --hero-grad-soft: rgba(240, 242, 245, 0.4);
  --hero-grad-top: rgba(240, 242, 245, 0.2);
  --grid-line: rgba(90, 125, 140, 0.06);
  --callout-bg: rgba(201, 106, 31, 0.06);
  --callout-exam-bg: rgba(176, 122, 21, 0.08);
  --callout-prac-bg: rgba(74, 110, 124, 0.06);
}
[data-theme="light"] body {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

/* =============================================================
   RESET
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* =============================================================
   ACCESSIBILITY
   ============================================================= */
.skip-link {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  padding: 8px 20px; background: var(--orange); color: white;
  border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none; z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================
   GLASSMORPHISM CARDS
   ============================================================= */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-card);
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
.label-mono {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
}

.heading-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

/* =============================================================
   SHARED COMPONENTS
   ============================================================= */
.level-badge {
  font-size: 12px; font-weight: 600; color: var(--orange-light);
  background: var(--orange-dim); padding: 4px 12px; border-radius: 99px;
  border: 1px solid rgba(224, 122, 47, 0.3);
  white-space: nowrap;
}

.progress-bar-container {
  height: 6px; background: var(--surface-bar);
  border-radius: 99px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 99px; transition: width 800ms var(--ease-out);
}

/* =============================================================
   CALLOUTS
   ============================================================= */
.callout {
  background: var(--callout-bg);
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.callout-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--orange); margin-bottom: 8px;
}
.callout p {
  font-size: 15px; line-height: 1.65;
  color: var(--text-secondary);
}
.callout.exam-alert {
  background: var(--callout-exam-bg);
  border-left-color: var(--warm-2);
}
.callout.exam-alert .callout-label { color: var(--warm-2); }
.callout.practitioner {
  background: var(--callout-prac-bg);
  border-left-color: var(--cyan);
}
.callout.practitioner .callout-label { color: var(--cyan); }
