/* ==========================================================================
   Base Styles and CSS Variables
   ========================================================================== */

:root {
  /* Colors - Living Gallery Light Mode */
  --color-bg: #f8f6f3;
  --color-bg-end: #eee8e0;
  --color-surface: #ffffff;
  --color-surface-alt: #f3ede6;

  --color-border: #e5ddd2;
  --color-border-strong: #d4c4b0;

  --color-text: #3a3028;
  --color-text-secondary: #5a4e42;
  --color-text-body: #7a6e62;
  --color-text-muted: #9a8a78;
  --color-primary-text: #f0ebe4;

  --color-primary: #3a3028;
  --color-primary-hover: #4a3f35;
  --color-primary-subtle: rgba(199, 125, 74, 0.08);
  --color-accent: #c77d4a;

  /* Semantic Colors */
  --color-success: #6b8f71;
  --color-success-bg: rgba(107, 143, 113, 0.1);
  --color-success-border: #8baf91;

  --color-danger: #b85450;
  --color-danger-bg: rgba(184, 84, 80, 0.1);
  --color-danger-border: #d4a098;

  --color-info: #7a8ca8;
  --color-info-bg: rgba(122, 140, 168, 0.1);
  --color-info-border: #9aacbf;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(58, 48, 40, 0.05);
  --shadow-md: 0 6px 20px rgba(58, 48, 40, 0.09);
  --shadow-lg: 0 20px 50px rgba(58, 48, 40, 0.25);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  /* Typography */
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
  font-weight: 400;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: linear-gradient(160deg, var(--color-bg) 0%, var(--color-bg-end) 100%);
  color: var(--color-text);
}

a {
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  letter-spacing: -0.3px;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }
}

button {
  font-family: 'DM Sans', sans-serif;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

button:focus,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
