/* ================================================
   SAS Migration - Design System
   Airbnb + Apple Design Guidelines
   ================================================ */

:root {
  /* ======================
     COLOR PALETTE
     ====================== */

  /* Primary Brand Colors */
  --color-primary: #de1f26;
  --color-primary-hover: #b91c1c;
  --color-primary-light: #fee2e2;
  --color-primary-lighter: #fef2f2;

  /* Navy Brand Colors */
  --color-navy: #071a52;
  --color-navy-dark: #05133b;
  --color-navy-light: #e0e7ff;

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-off-white: #fafafa;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f7f7f7;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #717171;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;

  /* Text Colors */
  --text-primary: #222222;
  --text-secondary: #717171;
  --text-muted: #b0b0b0;
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-color: #e5e5e5;
  --border-color-light: rgba(0, 0, 0, 0.08);
  --border-color-dark: rgba(0, 0, 0, 0.12);

  /* ======================
     TYPOGRAPHY
     ====================== */

  /* Font Family */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* 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 */
  --text-6xl: 3.75rem;     /* 60px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ======================
     SPACING SCALE (8px base)
     ====================== */

  --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-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-14: 3.5rem;      /* 56px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */

  /* ======================
     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-full: 9999px;

  /* ======================
     SHADOWS (Airbnb-style)
     ====================== */

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.12);

  /* Focus Ring Shadow */
  --shadow-focus: 0 0 0 4px rgba(7, 26, 82, 0.1);
  --shadow-focus-primary: 0 0 0 4px rgba(222, 31, 38, 0.15);

  /* ======================
     TRANSITIONS (Apple-like)
     ====================== */

  --transition-fastest: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Specific Transitions */
  --transition-colors: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                       background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                       border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-shadow: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-all: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* ======================
     Z-INDEX SCALE
     ====================== */

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-header: 1000;

  /* ======================
     CONTAINER WIDTHS
     ====================== */

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1170px;
  --container-2xl: 1280px;
}

/* ======================
   BASE RESET ENHANCEMENTS
   ====================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--color-white);
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ======================
   UTILITY CLASSES
   ====================== */

/* Text utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--color-primary); }
.text-navy { color: var(--color-navy); }

/* Background utilities */
.bg-white { background-color: var(--color-white); }
.bg-off-white { background-color: var(--color-off-white); }
.bg-gray { background-color: var(--color-gray-100); }
.bg-navy { background-color: var(--color-navy); }
.bg-primary { background-color: var(--color-primary); }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Transition utilities */
.transition-all { transition: var(--transition-all); }
.transition-colors { transition: var(--transition-colors); }
.transition-transform { transition: var(--transition-transform); }
.transition-shadow { transition: var(--transition-shadow); }
