/**
 * ItemMap Design System Tokens
 * Adapted from landing page "Cozy" theme
 */

:root {
  /* ========================================
     COLORS
     ======================================== */

  /* Primary - Sage Green */
  --color-primary: #3D4F4A;
  --color-primary-light: #5A6F68;
  --color-primary-rgb: 61, 79, 74;

  /* Secondary - Warm Linen */
  --color-secondary: #E8DCC8;
  --color-secondary-light: #F2EAD9;

  /* Accent - Terracotta Coral */
  --color-accent: #D66853;
  --color-accent-bright: #E07A65;
  --color-accent-glow: rgba(214, 104, 83, 0.3);

  /* Backgrounds */
  --color-bg: #FDFBF8;
  --color-bg-alt: #F5F0E8;
  --color-bg-card: #FFFFFF;
  --color-bg-rgb: 253, 251, 248;

  /* Text */
  --color-text: #2C2C2C;
  --color-text-muted: #6B6560;
  --color-text-light: #9A948D;

  /* Semantic */
  --color-success: #5A7F6F;
  --color-error: #dc3545;
  --color-highlight: #F0E2C8;

  /* Borders */
  --color-border: rgba(61, 79, 74, 0.1);
  --color-border-strong: rgba(61, 79, 74, 0.2);

  /* ========================================
     TYPOGRAPHY
     ======================================== */

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-weight-display: 500;
  --font-weight-body: 400;
  --font-weight-semibold: 600;

  /* ========================================
     SHADOWS
     ======================================== */

  --shadow-soft: 0 2px 12px rgba(61, 79, 74, 0.06);
  --shadow-float: 0 8px 30px rgba(61, 79, 74, 0.08);
  --shadow-elevated: 0 12px 40px rgba(61, 79, 74, 0.12);

  /* ========================================
     SPACING (8px base unit)
     ======================================== */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ========================================
     BORDER RADIUS
     ======================================== */

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ========================================
     TRANSITIONS
     ======================================== */

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   BASE STYLES
   ======================================== */

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

/* Display headings */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  line-height: 1.2;
  color: var(--color-text);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text utilities */
.text-display { font-family: var(--font-display); font-weight: var(--font-weight-display); }
.text-body { font-family: var(--font-body); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }

/* Background utilities */
.bg-card { background-color: var(--color-bg-card); }
.bg-alt { background-color: var(--color-bg-alt); }

/* Shadow utilities */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-float { box-shadow: var(--shadow-float); }

/* ========================================
   BUTTON STYLES
   ======================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-bright) 100%);
  color: white;
  font-family: var(--font-body);
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

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

/* ========================================
   CARD STYLES
   ======================================== */

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: var(--color-accent);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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