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

:root {
  color-scheme: light dark;

  /* Modern Color Palette - Soft & Elegant */
  --color-bg: #fafbfc;
  --color-bg-elevated: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #f8f9fa;
  --color-border-subtle: #e1e8ed;
  --color-border-strong: #cbd5e0;
  --color-border-accent: #a0aec0;

  /* Text */
  --color-text-main: #1a202c;
  --color-text-muted: #4a5568;
  --color-text-soft: #718096;
  --color-text-on-accent: #ffffff;

  /* Brand - Modern Teal & Purple */
  --color-accent: #0ea5e9;
  --color-accent-hover: #0284c7;
  --color-accent-soft: #e0f2fe;
  --color-accent-strong: #0369a1;
  --color-secondary: #8b5cf6;
  --color-secondary-soft: #f3e8ff;

  /* Semantic Colors */
  --color-danger: #ef4444;
  --color-danger-soft: #fee2e2;
  --color-warning: #f59e0b;
  --color-warning-soft: #fef3c7;
  --color-success: #10b981;
  --color-success-soft: #d1fae5;
  --color-info: #3b82f6;
  --color-info-soft: #dbeafe;

  /* Shadows - Soft & Layered */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-accent: 0 10px 15px -3px rgba(14, 165, 233, 0.3), 0 4px 6px -2px rgba(14, 165, 233, 0.2);

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-md: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

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

  /* Layout */
  --page-max-width: 1400px;
  --page-gutter: 1.5rem;
  --header-height: 80px;

  /* Legacy aliases for backward compatibility */
  --bg: var(--color-bg);
  --card: var(--color-surface);
  --text: var(--color-text-main);
  --muted: var(--color-text-muted);
  --border: var(--color-border-subtle);
  --accent: var(--color-accent);
  --accent-soft: var(--color-accent-soft);
  --danger: var(--color-danger);
  --shadow: var(--shadow-md);
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #fafbfc 50%, #f0f9ff 100%);
  background-attachment: fixed;
  color: var(--color-text-main);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Typography utilities */
.text-title-main {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.025em;
  color: var(--color-text-main);
}

.text-title-sub {
  font-size: var(--font-size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: var(--font-weight-semibold);
}

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

.text-soft {
  color: var(--color-text-soft);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
