/* =========================================================
   Yapper Care — Colors & Type
   Source of truth: Stitch "Serenity Path" design system
   Deep lavender (#7B61AD) + Mint (#98FFD9) + Public Sans
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---------- Primary (deep lavender) ---------- */
  --primary:         #7B61AD;
  --primary-50:      #F4F0FA;
  --primary-100:     #E5DCF1;
  --primary-200:     #CFC0E5;
  --primary-300:     #B8A3D7;
  --primary-400:     #9D86C5;
  --primary-500:     #7B61AD;
  --primary-600:     #644F8F;
  --primary-700:     #4E3E71;
  --primary-800:     #382C53;
  --primary-900:     #241C36;

  /* ---------- Secondary (neutral gray) ---------- */
  --secondary:       #E0E0E0;
  --secondary-50:    #FAFAFA;
  --secondary-100:   #F0F0F0;
  --secondary-200:   #E0E0E0;
  --secondary-300:   #C6C6C6;
  --secondary-400:   #A3A3A3;
  --secondary-500:   #7A7A7A;
  --secondary-600:   #545454;
  --secondary-700:   #363636;
  --secondary-800:   #1F1F1F;
  --secondary-900:   #0A0A0A;

  /* ---------- Tertiary (mint — accent only) ---------- */
  --tertiary:        #98FFD9;
  --tertiary-50:     #E8FFF5;
  --tertiary-100:    #C8FFE8;
  --tertiary-200:    #98FFD9;
  --tertiary-300:    #5EEDBD;
  --tertiary-400:    #2FD49F;
  --tertiary-500:    #14B583;
  --tertiary-600:    #0E8F68;
  --tertiary-700:    #0A6E50;
  --tertiary-800:    #064E39;
  --tertiary-900:    #032F23;

  /* ---------- Neutral (canvas) ---------- */
  --neutral:         #F5F5F7;
  --neutral-0:       #FFFFFF;
  --neutral-50:      #FAFAFB;
  --neutral-100:     #F5F5F7;
  --neutral-200:     #EAEAEE;
  --neutral-300:     #D5D5DC;
  --neutral-400:     #A8A8B2;
  --neutral-500:     #76767F;
  --neutral-600:     #545460;
  --neutral-700:     #38383F;
  --neutral-800:     #1F1F24;
  --neutral-900:     #0F0F13;

  /* ---------- Semantic / system ---------- */
  --success:         var(--tertiary-500);
  --destructive:     #D93535;
  --warning:         #E8A13A;

  /* ---------- Semantic tokens ---------- */
  --bg:              var(--neutral-100);      /* #F5F5F7 canvas */
  --bg-elevated:     var(--neutral-0);        /* cards */
  --bg-muted:        var(--neutral-200);      /* rails / hover */
  --bg-accent:       var(--primary-50);       /* lavender tint */
  --bg-mint:         var(--tertiary-50);      /* mint tint */

  --fg:              var(--neutral-900);
  --fg-muted:        var(--neutral-500);
  --fg-disabled:     var(--neutral-400);
  --fg-on-primary:   var(--neutral-0);
  --fg-on-tertiary:  var(--tertiary-900);
  --fg-accent:       var(--primary-600);

  --border:          var(--neutral-200);
  --border-strong:   var(--neutral-300);
  --ring:            var(--primary-500);

  /* ---------- Shape (Roundedness = 2, moderate) ---------- */
  --radius-xs:  6px;
  --radius-sm:  8px;   /* inputs, small buttons */
  --radius-md:  12px;  /* buttons, tags */
  --radius-lg:  16px;  /* cards */
  --radius-xl:  20px;  /* panels */
  --radius-2xl: 24px;  /* feature tiles */
  --radius-pill: 999px;

  /* ---------- Spacing (Spacing = 2, normal) ---------- */
  --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;
  --space-20: 80px;

  /* ---------- Shadows (soft, calm) ---------- */
  --shadow-xs:   0 1px 2px rgba(17,17,19,.04);
  --shadow-sm:   0 2px 6px rgba(17,17,19,.05);
  --shadow-md:   0 6px 20px -8px rgba(17,17,19,.10);
  --shadow-lg:   0 18px 40px -16px rgba(17,17,19,.14);
  --shadow-lav:  0 10px 28px -12px rgba(123,97,173,.35);
  --shadow-mint: 0 10px 28px -12px rgba(20,181,131,.30);

  /* ---------- Motion ---------- */
  --ease:        cubic-bezier(.2,.8,.2,1);
  --dur-fast:    160ms;
  --dur:         220ms;
  --dur-slow:    360ms;

  /* ---------- Type ---------- */
  --font-sans:  'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-label: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --display:    clamp(48px, 7vw, 88px);
  --h1:         clamp(36px, 5vw, 60px);
  --h2:         clamp(28px, 3.6vw, 44px);
  --h3:         clamp(22px, 2.4vw, 30px);
  --h4:         20px;
  --body-lg:    18px;
  --body:       16px;
  --body-sm:    14px;
  --label:      13px;
  --caption:    12px;

  --lh-tight: 1.05;
  --lh-snug:  1.25;
  --lh-body:  1.55;
  --lh-loose: 1.7;
}

/* ---------- Base type ---------- */
html, body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--h1); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--h2); font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: var(--h3); font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: var(--h4); font-weight: 700; letter-spacing: -0.01em; }

p { font-size: var(--body); line-height: var(--lh-body); color: var(--fg); margin: 0; }
.p-lg   { font-size: var(--body-lg); line-height: var(--lh-body); }
.p-sm   { font-size: var(--body-sm); line-height: var(--lh-snug); }
.caption { font-size: var(--caption); color: var(--fg-muted); }

/* Inter labels — small UI copy, tags, metadata */
.label {
  font-family: var(--font-label);
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--fg-muted);
}
.label-strong {
  font-family: var(--font-label);
  font-size: var(--label);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.005em;
}
.label-upper {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Utilities */
.text-muted   { color: var(--fg-muted); }
.text-accent  { color: var(--fg-accent); }
.text-mint    { color: var(--tertiary-600); }

.surface {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
