/**
 * Base Styles
 * Understated Luxury & Refined Elegance
 * Palette: Soft White, Warm Beige, Light Taupe, Charcoal, Subtle Gold
 */

/* ============================================
   VARIABLES
   ============================================ */
:root {
  /* Colors - Sophisticated Neutral Palette */
  --color-bg: #FAF9F6;              /* Soft white/cream */
  --color-bg-elevated: #FFFFFF;      /* Pure white for cards */
  --color-bg-warm: #F5F1EB;          /* Warm beige */
  
  --color-text: #2C2C2C;             /* Charcoal gray */
  --color-text-secondary: #6B6B6B;   /* Muted charcoal */
  --color-text-tertiary: #9A9590;    /* Light taupe for subtle text */
  
  --color-primary: #C5A059;          /* Subtle gold */
  --color-primary-hover: #B08D4A;    /* Deeper gold */
  --color-secondary: #A89F91;        /* Light taupe */
  --color-accent: #D4AF37;           /* Rich gold accent */
  
  --color-success: #7A8B6E;          /* Muted sage green */
  --color-warning: #C9A227;          /* Muted amber */
  --color-danger: #B54A4A;           /* Softened red */
  --color-neutral-100: #F5F5F3;
  --color-neutral-200: #E8E6E3;
  --color-neutral-300: #D4D0CA;
  --color-neutral-400: #A8A49D;
  --color-neutral-500: #6B6B6B;
  --color-neutral-600: #4A4A4A;
  --color-neutral-700: #2C2C2C;
  
  /* Typography - Elegant & Readable */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --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 */
  
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  
  /* Spacing - Generous & Airy */
  --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-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  
  /* Border Radius - Subtle & Refined */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows - Soft & Diffused */
  --shadow-sm: 0 1px 2px rgba(44, 44, 44, 0.04);
  --shadow-md: 0 4px 12px rgba(44, 44, 44, 0.06);
  --shadow-lg: 0 12px 40px rgba(44, 44, 44, 0.1);
  --shadow-xl: 0 24px 60px rgba(44, 44, 44, 0.12);
  
  /* Transitions - Smooth & Elegant */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-6);
}

/* Dark mode support (optional enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1A1A1A;
    --color-bg-elevated: #242424;
    --color-text: #F5F5F3;
    --color-text-secondary: #A8A49D;
  }
}

/* ============================================
   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 {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  line-height: var(--leading-normal);
}

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;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  letter-spacing: -0.01em;
}

/* 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);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-bg-elevated);
}

/* ============================================
   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);
}

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-8 {
  gap: var(--space-8);
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Screen Reader Only */
.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;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons - Elegant & Understated */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-bg-elevated)!important;
  border-color: var(--color-primary);
}

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

.btn--secondary {
  background-color: var(--color-neutral-300);
  color: var(--color-text)!important;
  border-color: var(--color-neutral-300);
}

.btn--secondary:hover {
  background-color: var(--color-bg-warm);
  border-color: var(--color-secondary);
  text-decoration: none;
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.btn--ghost:hover {
  background-color: var(--color-bg-warm);
  text-decoration: none;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Form Inputs - Clean & Minimal */
.input,
.textarea,
.select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-tertiary);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--color-secondary);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-normal);
}

/* Cards - Sophisticated & Airy */
.card {
  background-color: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-neutral-200);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card--elevated {
  box-shadow: var(--shadow-lg);
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  .input,
  a {
    transition: none;
  }
  
  .btn:hover,
  .card:hover {
    transform: none;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-4);
  }
  
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .card {
    padding: var(--space-6);
  }
}
