/* ====================================================================
   STERLING HOME GROUP — SUB-ZERO INSPIRED DESIGN SYSTEM
   Premium design tokens, animations, and component library
   ==================================================================== */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Primary Brand Colors — Sub-Zero Inspired */
  --primary-blue: #0080C5;
  --primary-blue-dark: #004E77;
  --primary-blue-light: #40A0D5;
  --primary-blue-lighter: #E5F4FB;
  
  /* Deep Navy/Ink for Premium Feel */
  --ink: #002E61;
  --ink-light: #003D7A;
  --ink-lighter: #1A4D8F;
  
  /* Neutral Grays (Cool-toned) */
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* Semantic Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --info: var(--primary-blue);
  --info-light: var(--primary-blue-lighter);
  
  /* Background & Surface */
  --bg-primary: #FFFFFF;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;
  
  /* Text Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-700);
  --text-tertiary: var(--gray-600);
  --text-inverse: #FFFFFF;
  --text-brand: var(--ink);
  
  /* Spacing Scale (4px base) */
  --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 Scale */
  --font-family-base: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-heading: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 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-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;
  
  --letter-spacing-tight: -0.02em;
  --letter-spacing-base: 0;
  --letter-spacing-wide: 0.05em;
  
  /* Border Radius (Premium) */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-base: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;
  
  /* Shadows (Layered, Premium) */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-base: 0 4px 8px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.10), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, 0.12), 0 6px 12px -3px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.14), 0 10px 20px -4px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 32px 64px -12px rgba(0, 0, 0, 0.16), 0 16px 32px -6px rgba(0, 0, 0, 0.14);
  
  /* Focus Ring */
  --focus-ring: 0 0 0 3px var(--primary-blue-lighter), 0 0 0 1px var(--primary-blue) inset;
  --focus-ring-error: 0 0 0 3px var(--error-light), 0 0 0 1px var(--error) inset;
  
  /* Transitions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
  
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  
  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-modal: 2000;
  --z-popover: 3000;
  --z-toast: 4000;
  --z-preloader: 9999;
}

/* Dark mode support (respects system preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0B0F13;
    --bg-secondary: #141A21;
    --bg-tertiary: #1C242D;
    --surface: #141A21;
    --surface-elevated: #1C242D;
    --text-primary: #E8EEF6;
    --text-secondary: #A5AFBD;
    --text-tertiary: #6C757D;
    --gray-50: #343A40;
    --gray-100: #495057;
  }
}

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

/* Fade & Slide (scroll reveal) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

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

/* Shimmer effect for loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Pulse for attention */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Smooth reveal classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out),
              filter var(--duration-slow) var(--ease-out);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

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

/* Spacing utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* Text utilities */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-brand { color: var(--text-brand); }

/* Visual utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-base { box-shadow: var(--shadow-base); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.rounded-base { border-radius: var(--radius-base); }
.rounded-lg { border-radius: var(--radius-lg); }
