/* ==========================================================================
   YLIPS Design System
   Modern SaaS Design Tokens - Derived from InBio
   ========================================================================== */

:root {
  /* ===== COLORS ===== */

  /* Primary - Pink (Brand Color) */
  --primary: #ec4b80;
  --primary-dark: #b63063;
  --primary-light: #f97392;
  --primary-50: rgba(236, 75, 128, 0.05);
  --primary-100: rgba(236, 75, 128, 0.1);
  --primary-200: rgba(236, 75, 128, 0.2);

  /* Neutral Scale */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #030712;

  /* Semantic Colors */
  --success: #10b981;
  --success-dark: #059669;
  --success-light: #d1fae5;
  --success-50: rgba(16, 185, 129, 0.1);

  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fef3c7;
  --warning-50: rgba(245, 158, 11, 0.1);

  --error: #ef4444;
  --error-dark: #dc2626;
  --error-light: #fee2e2;
  --error-50: rgba(239, 68, 68, 0.1);

  --info: #3b82f6;
  --info-dark: #2563eb;
  --info-light: #dbeafe;
  --info-50: rgba(59, 130, 246, 0.1);

  /* ===== SHADOWS ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px 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-card: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-primary: 0 12px 28px rgba(236, 75, 128, 0.3);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

  /* ===== BORDER RADIUS ===== */
  --radius-none: 0;
  --radius-sm: 0.375rem;    /* 6px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px */
  --radius-3xl: 1.75rem;    /* 28px - card radius from inbio */
  --radius-full: 9999px;

  /* ===== SPACING ===== */
  --space-0: 0;
  --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 */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* ===== TYPOGRAPHY ===== */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;

  /* ===== Z-INDEX ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* ===== LAYOUT ===== */
  --header-height: 64px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-max: 1280px;
  --content-max: 720px;

  /* ===== BOOTSTRAP 5 OVERRIDES ===== */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 236, 75, 128;
  --bs-secondary: var(--gray-600);
  --bs-secondary-rgb: 75, 85, 99;
  --bs-success: var(--success);
  --bs-success-rgb: 16, 185, 129;
  --bs-info: var(--info);
  --bs-info-rgb: 59, 130, 246;
  --bs-warning: var(--warning);
  --bs-warning-rgb: 245, 158, 11;
  --bs-danger: var(--error);
  --bs-danger-rgb: 239, 68, 68;
  --bs-light: var(--gray-100);
  --bs-light-rgb: 243, 244, 246;
  --bs-dark: var(--gray-900);
  --bs-dark-rgb: 17, 24, 39;

  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: var(--text-base);
  --bs-body-font-weight: var(--font-normal);
  --bs-body-line-height: var(--leading-normal);
  --bs-body-color: var(--gray-900);
  --bs-body-bg: var(--white);

  --bs-border-width: 1px;
  --bs-border-color: var(--gray-200);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-border-radius-xl: var(--radius-xl);
  --bs-border-radius-pill: var(--radius-full);

  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-dark);
  --bs-link-decoration: none;
  --bs-link-hover-decoration: underline;

  --bs-box-shadow: var(--shadow-md);
  --bs-box-shadow-sm: var(--shadow-sm);
  --bs-box-shadow-lg: var(--shadow-lg);
  --bs-box-shadow-inset: var(--shadow-inner);

  --bs-focus-ring-width: 3px;
  --bs-focus-ring-opacity: 0.15;
  --bs-focus-ring-color: rgba(236, 75, 128, 0.25);
}

/* ===== BASE STYLES ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--gray-900);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY BASE ===== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== FOCUS STYLES ===== */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SELECTION ===== */

::selection {
  background-color: var(--primary-100);
  color: var(--gray-900);
}

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ===== UTILITY CLASSES ===== */

/* Text Colors */
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }
.text-info { color: var(--info) !important; }

/* Background Colors */
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-50 { background-color: var(--primary-50) !important; }
.bg-primary-100 { background-color: var(--primary-100) !important; }
.bg-gray-50 { background-color: var(--gray-50) !important; }
.bg-gray-100 { background-color: var(--gray-100) !important; }
.bg-success-light { background-color: var(--success-light) !important; }
.bg-warning-light { background-color: var(--warning-light) !important; }
.bg-error-light { background-color: var(--error-light) !important; }
.bg-info-light { background-color: var(--info-light) !important; }

/* Border Colors */
.border-primary { border-color: var(--primary) !important; }
.border-gray-100 { border-color: var(--gray-100) !important; }
.border-gray-200 { border-color: var(--gray-200) !important; }

/* Font Weights */
.font-normal { font-weight: var(--font-normal) !important; }
.font-medium { font-weight: var(--font-medium) !important; }
.font-semibold { font-weight: var(--font-semibold) !important; }
.font-bold { font-weight: var(--font-bold) !important; }

/* Font Sizes */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }
.text-3xl { font-size: var(--text-3xl) !important; }

/* Shadows */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-card { box-shadow: var(--shadow-card) !important; }

/* Border Radius */
.rounded-none { border-radius: var(--radius-none) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Transitions */
.transition-fast { transition: all var(--transition-fast); }
.transition-base { transition: all var(--transition-base); }
.transition-slow { transition: all var(--transition-slow); }

/* Line Clamp */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== ANIMATIONS ===== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in { animation: fadeIn var(--transition-base) ease-out; }
.animate-fade-in-up { animation: fadeInUp var(--transition-base) ease-out; }
.animate-fade-in-down { animation: fadeInDown var(--transition-base) ease-out; }
.animate-scale-in { animation: scaleIn var(--transition-base) ease-out; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 2cm;
  }
}
