/* ============================================
   BEBELOVD BASE STYLES
   Organic • Minimalist • Earthy • Serene
   ============================================ */

/* Variables */
:root {
  /* Colors - Earthy Palette */
  --color-cream: #FAF8F5;
  --color-warm-white: #FFFCF8;
  --color-sage: #8A9A87;
  --color-sage-dark: #6B7A68;
  --color-sage-light: #B8C4B5;
  --color-wood: #D4C5B3;
  --color-wood-dark: #A8947E;
  --color-terracotta: #C9A9A0;
  --color-amber: #E6C9A8;
  
  --color-text: #3D3B37;
  --color-text-light: #6B6965;
  --color-text-muted: #9A9894;
  
  --color-background: var(--color-cream);
  --color-surface: var(--color-warm-white);
  
  --color-primary: var(--color-sage);
  --color-primary-hover: var(--color-sage-dark);
  
  --color-success: #A8B5A0;
  --color-warning: var(--color-amber);
  --color-danger: var(--color-terracotta);
  
  --color-border: rgba(61, 59, 55, 0.1);
  --color-border-strong: rgba(61, 59, 55, 0.2);
  
  /* Typography */
  --font-heading: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  /* Spacing (4px base) */
  --space-0: 0;
  --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;
  
  /* Radius - Organic soft shapes */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows - Soft natural light */
  --shadow-sm: 0 1px 2px 0 rgba(61, 59, 55, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(61, 59, 55, 0.05), 0 2px 4px -2px rgba(61, 59, 55, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(61, 59, 55, 0.05), 0 4px 6px -4px rgba(61, 59, 55, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(61, 59, 55, 0.05), 0 8px 10px -6px rgba(61, 59, 55, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-6);
}

/* Reset & Normalize */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); margin-bottom: var(--space-6); }
h2 { font-size: var(--text-4xl); margin-bottom: var(--space-5); }
h3 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
h4 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
h5 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
h6 { font-size: var(--text-lg); margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-light);
}

a {
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.grid { display: grid; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.025em;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  border: 1px solid transparent;
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
}

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.input:hover {
  border-color: var(--color-border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(138, 154, 135, 0.1);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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