/* style.css — GovCon Pathway Assessment Quiz
   Custom Palette: GovCon TechLab — Purple to Teal gradient
   Font Pairing: Libre Baskerville (display) + Plus Jakarta Sans (body)
*/

/* ============================================
   CUSTOM PALETTE: GOVCON TECHLAB — PURPLE + TEAL
   Deep purple for authority and brand anchor.
   Teal/cyan for energy and forward motion.
   Clean white backgrounds for clarity.
   ============================================ */

:root, [data-theme="light"] {
  /* --- Type Scale (fluid) --- */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* --- 4px Spacing System --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Fonts --- */
  --font-display: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;

  /* --- Surfaces (Clean White) --- */
  --color-bg:               #f8f9fc;
  --color-surface:          #f0f2f8;
  --color-surface-2:        #e8ebf4;
  --color-surface-offset:   #e0e4f0;
  --color-surface-offset-2: #d8dcea;
  --color-surface-dynamic:  #d0d5e2;
  --color-divider:          #c8cdd8;
  --color-border:           #b8bfce;

  /* --- Text --- */
  --color-text:         #1a1628;   /* Deep purple-black */
  --color-text-muted:   #4a4660;   /* Purple-muted */
  --color-text-faint:   #8a87a0;   /* Faint */
  --color-text-inverse: #f8f9fc;   /* On dark */

  /* --- Primary Accent (Teal/Cyan) --- */
  --color-primary:           #1cb4c3;   /* Teal from logo */
  --color-primary-hover:     #159da8;
  --color-primary-active:    #0f868e;
  --color-primary-highlight: #ddf4f6;

  /* --- Secondary (Deep Purple) --- */
  --color-navy:              #502a79;   /* Purple from logo */
  --color-navy-hover:        #412065;
  --color-navy-active:       #321850;
  --color-navy-highlight:    #e0d6ec;

  /* --- Brand Gradient --- */
  --gradient-brand: linear-gradient(135deg, #502a79 0%, #465090 40%, #309fbd 70%, #1cb4c3 100%);
  --gradient-brand-subtle: linear-gradient(135deg, #502a79 0%, #1cb4c3 100%);

  /* --- Semantic: Success --- */
  --color-success:           #2e6b3e;
  --color-success-hover:     #1f4e2c;
  --color-success-active:    #13331d;
  --color-success-highlight: #cce0d3;

  /* --- Semantic: Error --- */
  --color-error:             #a12c2c;
  --color-error-hover:       #7d1e1e;
  --color-error-active:      #561212;
  --color-error-highlight:   #e0cece;

  /* --- Semantic: Warning --- */
  --color-warning:           #c4700a;
  --color-warning-hover:     #a05a07;
  --color-warning-active:    #7d4404;
  --color-warning-highlight: #f0dfc4;

  /* --- Radius --- */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 320ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Shadows (cool-toned) --- */
  --shadow-sm: 0 1px 3px oklch(0.18 0.03 280 / 0.07);
  --shadow-md: 0 4px 16px oklch(0.18 0.03 280 / 0.10);
  --shadow-lg: 0 12px 40px oklch(0.18 0.03 280 / 0.14);
  --shadow-xl: 0 24px 64px oklch(0.18 0.03 280 / 0.18);

  /* --- Content widths --- */
  --content-narrow:  600px;
  --content-default: 840px;
  --content-wide:    1100px;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --color-bg:               #0e0f1a;
  --color-surface:          #141526;
  --color-surface-2:        #1a1c30;
  --color-surface-offset:   #18192c;
  --color-surface-offset-2: #202238;
  --color-surface-dynamic:  #2a2d4a;
  --color-divider:          #282b45;
  --color-border:           #363a5a;

  --color-text:         #e6e4ee;
  --color-text-muted:   #9896b0;
  --color-text-faint:   #5a586e;
  --color-text-inverse: #0e0f1a;

  --color-primary:           #28d4e4;   /* Bright teal for dark mode */
  --color-primary-hover:     #3ce0ee;
  --color-primary-active:    #50eaf4;
  --color-primary-highlight: #102830;

  --color-navy:              #9b7cc8;   /* Lighter purple for dark mode */
  --color-navy-hover:        #b094d8;
  --color-navy-active:       #c4ace6;
  --color-navy-highlight:    #1e1830;

  --gradient-brand: linear-gradient(135deg, #7b52b0 0%, #6878c0 40%, #40c0d8 70%, #28d4e4 100%);
  --gradient-brand-subtle: linear-gradient(135deg, #7b52b0 0%, #28d4e4 100%);

  --color-success:           #4a9e5e;
  --color-success-hover:     #35844a;
  --color-success-active:    #226834;
  --color-success-highlight: #1a3322;

  --color-error:             #d16060;
  --color-error-hover:       #b84444;
  --color-error-active:      #9e2d2d;
  --color-error-highlight:   #3a1818;

  --color-warning:           #e8921e;
  --color-warning-hover:     #f4a434;
  --color-warning-active:    #ffb84c;
  --color-warning-highlight: #3a2408;

  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
  --shadow-xl: 0 24px 64px oklch(0 0 0 / 0.55);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #0e0f1a;
    --color-surface:          #141526;
    --color-surface-2:        #1a1c30;
    --color-surface-offset:   #18192c;
    --color-surface-offset-2: #202238;
    --color-surface-dynamic:  #2a2d4a;
    --color-divider:          #282b45;
    --color-border:           #363a5a;
    --color-text:         #e6e4ee;
    --color-text-muted:   #9896b0;
    --color-text-faint:   #5a586e;
    --color-text-inverse: #0e0f1a;
    --color-primary:           #28d4e4;
    --color-primary-hover:     #3ce0ee;
    --color-primary-active:    #50eaf4;
    --color-primary-highlight: #102830;
    --color-navy:              #9b7cc8;
    --color-navy-hover:        #b094d8;
    --color-navy-active:       #c4ace6;
    --color-navy-highlight:    #1e1830;
    --gradient-brand: linear-gradient(135deg, #7b52b0 0%, #6878c0 40%, #40c0d8 70%, #28d4e4 100%);
    --gradient-brand-subtle: linear-gradient(135deg, #7b52b0 0%, #28d4e4 100%);
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
    --shadow-xl: 0 24px 64px oklch(0 0 0 / 0.55);
  }
}
