/* 
 * Main CSS - Global styles and CSS custom properties
 * Kirsten Van Der Merwe - Virtual Assistant Website
 */

/* CSS Custom Properties */
:root {
  /* Colors - Warm, Feminine Palette */
  --color-primary: #8B6F7F;
  --color-secondary: #F4E8E3;
  --color-accent: #D4A5A5;
  --color-text: #5A4A52;
  --color-background: #FEFDFB;
  --color-light-bg: #FAF5F0;
  --color-border: #E8D5D0;
  --color-success: #A8C9A4;
  --color-error: #D89B9B;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --border-width: 1px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Layout */
  --max-width-content: 1200px;
  --max-width-text: 65ch;
  --header-height: 80px;
}

/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--line-height-tight);
  font-weight: 500;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5, h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-md);
}

.container p {
  max-width: var(--max-width-text);
}

.text-center p {
  max-width: var(--max-width-text);
  margin-left: auto;
  margin-right: auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-light {
  background-color: var(--color-light-bg);
}

.text-center {
  text-align: center;
}

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* Skip to main content - Accessibility */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-primary);
  color: var(--color-background);
  text-decoration: none;
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
  top: var(--space-sm);
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-md);
  z-index: 1000;
  max-width: 400px;
}

.flash-message {
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}

.flash-message.success {
  background-color: var(--color-success);
  color: white;
}

.flash-message.error {
  background-color: var(--color-error);
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
