/* ============================================
   Kalvie Willow Merchant - Modern Design System
   ============================================ */

:root {
  /* Colors */
  --primary: #5A3D82;
  --primary-light: #7B5EA7;
  --primary-lighter: #9B7FC7;
  --primary-bg: #F0EBF7;
  --primary-bg-soft: #F7F4FB;
  --accent: #E8A0BF;
  --accent-soft: #F5D9E6;
  --success: #6B9E7A;
  --success-bg: #E8F2EB;
  --warning: #D4A24C;
  --warning-bg: #FBF3E2;
  --danger: #C75B5B;
  --danger-bg: #FBEAEA;

  --text-primary: #1A1B1C;
  --text-secondary: #55585C;
  --text-muted: #8B8F96;
  --bg-page: #FAF8F5;
  --bg-card: #FFFFFF;
  --border: #E8E6E1;
  --border-light: #F0EEE9;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --h1-size: 36px;
  --h1-height: 1.15;
  --h2-size: 26px;
  --h2-height: 1.2;
  --h3-size: 20px;
  --h3-height: 1.3;
  --body-size: 16px;
  --body-height: 1.7;
  --small-size: 14px;
  --small-height: 1.6;
  --caption-size: 13px;
  --caption-height: 1.5;

  /* Spacing (8px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-primary: 0 4px 14px rgba(90,61,130,0.18);
}

/* Base */
* { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: var(--body-height);
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Typography
   ============================================ */
.h1 { font-size: var(--h1-size); font-weight: 700; line-height: var(--h1-height); color: var(--text-primary); letter-spacing: -0.02em; }
.h2 { font-size: var(--h2-size); font-weight: 700; line-height: var(--h2-height); color: var(--text-primary); letter-spacing: -0.01em; }
.h3 { font-size: var(--h3-size); font-weight: 600; line-height: var(--h3-height); color: var(--text-primary); }
.body-lg { font-size: 18px; line-height: 1.7; color: var(--text-secondary); }
.body { font-size: var(--body-size); line-height: var(--body-height); color: var(--text-secondary); }
.small { font-size: var(--small-size); line-height: var(--small-height); color: var(--text-secondary); }
.caption { font-size: var(--caption-size); line-height: var(--caption-height); color: var(--text-muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(90,61,130,0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--primary);
  padding: 11px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid var(--primary-light);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-secondary:hover { background: var(--primary-bg); }

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card-icon:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-lighter);
}
.card-icon .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-icon .icon-wrap svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-icon h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}
.card-icon p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.card-highlight {
  background: linear-gradient(135deg, var(--primary-bg-soft), var(--primary-bg));
  border: 1px solid rgba(90,61,130,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card-warning {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

/* ============================================
   Section
   ============================================ */
.section {
  padding: var(--space-2xl) 0;
}
.section-header {
  margin-bottom: var(--space-xl);
}
.section-header .eyebrow {
  margin-bottom: var(--space-sm);
}
.section-header h2 {
  margin: 0 0 var(--space-sm) 0;
}
.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 600px;
}

/* ============================================
   Grid
   ============================================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); }

/* ============================================
   Badge / Tag
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
}

/* ============================================
   Stat
   ============================================ */
.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Divider
   ============================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

/* ============================================
   Link
   ============================================ */
.link-primary {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-primary:hover { text-decoration: underline; }
