/* =====================================================
   KarpLabs — Global Styles
   karplabs.in
   ===================================================== */

/* ─── CSS Custom Properties ─── */
:root {
  /* Primary — Deep Purple */
  --md-primary-50:  #ede7f6;
  --md-primary-100: #d1c4e9;
  --md-primary-500: #673ab7;
  --md-primary-600: #5e35b1;
  --md-primary-700: #512da8;
  --md-primary-900: #311b92;

  /* Secondary — Teal */
  --md-secondary-400: #26c6da;
  --md-secondary-500: #00bcd4;
  --md-secondary-700: #0097a7;

  /* Accent */
  --md-accent: #ff4081;

  /* Neutral */
  --md-surface: #ffffff;
  --md-surface-variant: #f5f5f5;
  --md-on-surface: #212121;
  --md-on-surface-muted: #757575;
  --md-divider: #e0e0e0;

  /* Elevation shadows */
  --shadow-1: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
  --shadow-2: 0 3px 6px rgba(0,0,0,.15), 0 2px 4px rgba(0,0,0,.12);
  --shadow-3: 0 10px 20px rgba(0,0,0,.15), 0 3px 6px rgba(0,0,0,.10);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Spacing */
  --section-padding: 80px 0;
  --nav-height: 64px;
}

/* ─── Dark Mode ─── */
@media (prefers-color-scheme: dark) {
  :root {
    --md-surface: #121212;
    --md-surface-variant: #1e1e1e;
    --md-on-surface: #e8e8e8;
    --md-on-surface-muted: #9e9e9e;
    --md-divider: #2c2c2c;
  }
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--md-on-surface);
  background-color: var(--md-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  font-weight: 700;
  color: var(--md-on-surface);
}

p {
  color: var(--md-on-surface-muted);
}

a {
  color: var(--md-primary-600);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--md-primary-700);
}

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

/* ─── Focus styles (WCAG AA) ─── */
:focus-visible {
  outline: 3px solid var(--md-primary-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Utility ─── */
.text-muted {
  color: var(--md-on-surface-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
