/* ============================================
   KHOLI THE BAKER - DESIGN SYSTEM
   Base Styles & CSS Variables
   ============================================ */

/* CSS Custom Properties - Brand Colors */
:root {
  /* Primary Brand Colors - Updated Palette */
  --anzac: #D9B748;
  --anzac-light: #E5C970;
  --anzac-dark: #B8960C;
  --ecru-white: #F1F3E3;
  --ecru-light: #F7F8F0;
  --ecru-dark: #E5E7D8;
  --revolver: #1B0E1C;
  --revolver-light: #2D1A2E;
  --revolver-dark: #0F0710;
  
  /* Legacy aliases for backward compatibility */
  --gold: var(--anzac);
  --gold-light: var(--anzac-light);
  --gold-dark: var(--anzac-dark);
  --cream: var(--ecru-white);
  --cream-light: var(--ecru-light);
  --cream-dark: var(--ecru-dark);
  --chocolate: var(--revolver);
  --chocolate-light: var(--revolver-light);
  --chocolate-dark: var(--revolver-dark);
  
  /* Accent Colors */
  --my-pink: #D79F91;
  --my-pink-light: #E8B5A8;
  --woody-brown: #3D2D29;
  --woody-brown-light: #4D3D39;
  
  /* Legacy aliases */
  --blush: var(--my-pink);
  --blush-light: var(--my-pink-light);
  --butter: var(--anzac);
  --butter-light: var(--anzac-light);
  
  /* Functional Colors */
  --white: #FFFFFF;
  --black: var(--revolver);
  --gray-100: var(--ecru-light);
  --gray-200: var(--ecru-dark);
  --gray-300: #D0D0D0;
  --gray-400: #A8A8A8;
  --gray-500: #808080;
  --gray-600: var(--woody-brown-light);
  --gray-700: var(--woody-brown);
  
  /* Semantic Colors */
  --success: #22C55E;
  --error: #EF4444;
  --warning: #F59E0B;
  
  /* Typography Scale */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Dancing Script', cursive;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.65vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.15rem + 1.1vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.7rem + 2.75vw, 3.5rem);
  --text-4xl: clamp(2.75rem, 2rem + 3.75vw, 4.5rem);
  --text-5xl: clamp(3.5rem, 2.5rem + 5vw, 6rem);
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Shadows - Updated for new color palette */
  --shadow-sm: 0 1px 2px rgba(27, 14, 28, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(27, 14, 28, 0.1), 0 2px 4px -2px rgba(27, 14, 28, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(27, 14, 28, 0.1), 0 4px 6px -4px rgba(27, 14, 28, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(27, 14, 28, 0.1), 0 8px 10px -6px rgba(27, 14, 28, 0.1);
  --shadow-gold: 0 4px 20px rgba(217, 183, 72, 0.35);
  --shadow-gold-lg: 0 8px 40px rgba(217, 183, 72, 0.45);
  
  /* Transitions - Liquid Caramel Easing */
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Animation Durations */
  --duration-micro: 200ms;
  --duration-fast: 300ms;
  --duration-normal: 500ms;
  --duration-slow: 800ms;
  --duration-slower: 1200ms;
  --duration-ambient: 12s;
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-nav: 300;
  --z-modal: 400;
  --z-tooltip: 500;
  --z-webgl: -1;
  
  /* Container */
  --container-max: 1400px;
  --container-padding: clamp(1rem, 5vw, 3rem);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--revolver);
  background-color: var(--ecru-white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--revolver);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--anzac-dark);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-quad);
}

a:hover {
  color: var(--woody-brown);
}

/* Accent Text */
.accent-text {
  font-family: var(--font-accent);
  color: var(--gold);
}

/* Selection */
::selection {
  background-color: var(--gold);
  color: var(--white);
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ecru-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--anzac);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--anzac-dark);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: 900px;
}

/* Glass Morphism */
.glass {
  background: rgba(241, 243, 227, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 183, 72, 0.25);
}

/* Gold/Anzac Gradient */
.gold-gradient {
  background: linear-gradient(135deg, var(--anzac) 0%, var(--anzac-light) 50%, var(--anzac) 100%);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--anzac-dark) 0%, var(--anzac) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   FOOTER BASE STYLES (Fallback)
   ============================================ */

footer {
  background: linear-gradient(180deg, var(--revolver) 0%, var(--revolver-dark) 100%);
  color: var(--ecru-white);
  padding: 5rem 0 2rem;
}

footer a {
  color: rgba(241, 243, 227, 0.9);
}

footer a:hover {
  color: var(--anzac-light);
}
