/* =========================================================
   Baubap Design System — Colors & Type
   ========================================================= */

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

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Onest-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/Onest-VariableFont_wght.ttf') format('truetype');
}

:root {
  /* ------------------------------------------------------
     PURPLE — primary brand ramp
     ------------------------------------------------------ */
  --purple-50:  rgb(242, 235, 255); /* palest wash */
  --purple-100: rgb(239, 235, 255);
  --purple-150: rgb(232, 222, 255);
  --purple-200: rgb(203, 173, 255); /* key fill — illustration highlights */
  --purple-300: rgb(167, 143, 255);
  --purple-400: rgb(151,  92, 255); /* PRIMARY — the Baubap purple */
  --purple-500: rgb(138,  56, 245);
  --purple-600: rgb(125,  51, 255); /* deep press / mascot */
  --purple-700: rgb( 77,  31, 157);
  --purple-800: rgb( 52,  20, 108);
  --purple-900: rgb( 23,  23,  33);

  /* ------------------------------------------------------
     ACCENTS — illustration palette
     ------------------------------------------------------ */
  --yellow-100: rgb(255, 233, 181);
  --yellow-200: rgb(255, 217, 127);
  --yellow-300: rgb(255, 211, 106);
  --yellow-400: rgb(248, 176,  49);
  --yellow-500: rgb(247, 143,   3);
  --yellow-600: rgb(230, 180,  61);

  --green-100:  rgb(223, 243, 189);
  --green-200:  rgb(223, 241, 194);
  --green-300:  rgb(171, 217,  94);
  --green-400:  rgb(103, 166,   0); /* success */

  --orange-400: rgb(171,  90,  16);
  --orange-500: rgb(154,  73,  17);

  --red-400:    rgb(184,  57,  57); /* danger */

  --blue-400:   rgb( 89, 118, 223);

  /* ------------------------------------------------------
     NEUTRALS
     ------------------------------------------------------ */
  --ink-900:    rgb( 23,  23,  33); /* text primary */
  --ink-800:    rgb( 64,  65, 100); /* text secondary */
  --ink-700:    rgb( 80,  80,  80);
  --ink-500:    rgb(145, 154, 170); /* borders, disabled */
  --ink-300:    rgb(217, 217, 217);
  --ink-100:    rgb(247, 248, 249); /* surface alt */
  --ink-0:      rgb(255, 255, 255);

  /* ------------------------------------------------------
     SEMANTIC
     ------------------------------------------------------ */
  --fg-primary:    var(--ink-900);
  --fg-secondary:  var(--ink-800);
  --fg-muted:      var(--ink-500);
  --fg-on-primary: var(--ink-0);
  --fg-brand:      var(--purple-400);

  --bg-canvas:     var(--ink-0);
  --bg-surface:    var(--ink-0);
  --bg-surface-alt:var(--ink-100);
  --bg-wash:       var(--purple-50);     /* pale purple washes for illustration backgrounds */
  --bg-brand:      var(--purple-400);
  --bg-brand-deep: var(--purple-600);

  --border-subtle: var(--ink-300);
  --border-default:var(--ink-500);
  --border-brand:  var(--purple-400);

  --success:       var(--green-400);
  --warning:       var(--yellow-500);
  --danger:        var(--red-400);

  /* ------------------------------------------------------
     RADII — per docs: illustrations sit on 10px/50% shapes
     ------------------------------------------------------ */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-pill: 9999px;

  /* ------------------------------------------------------
     SPACING — 4px grid
     ------------------------------------------------------ */
  --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;

  /* ------------------------------------------------------
     ELEVATION — soft, illustration-friendly
     ------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(23,23,33,0.06), 0 1px 1px rgba(23,23,33,0.04);
  --shadow-md: 0 4px 12px rgba(23,23,33,0.08), 0 2px 4px rgba(23,23,33,0.04);
  --shadow-lg: 0 12px 32px rgba(23,23,33,0.10), 0 4px 8px rgba(23,23,33,0.06);
  --shadow-xl: 0 24px 48px rgba(23,23,33,0.14), 0 8px 16px rgba(23,23,33,0.08);
  --shadow-illustration: 1px 1px 2px rgba(0,0,0,0.2); /* tight "shadow" prop used inside Baubap illustrations */
  --shadow-brand: 0 8px 24px rgba(125,51,255,0.24);

  /* ------------------------------------------------------
     TYPE — foundations
     ------------------------------------------------------ */
  --font-display: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ui:      "Inter", "Onest", system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Type scale (mobile-first; cap at display sizes used in Figma) */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;  /* Onest Regular 24 — paragraph / hero subtitle */
  --fs-26: 26px;
  --fs-28: 28px;
  --fs-30: 30px;  /* Onest SemiBold 30 — section title */
  --fs-34: 34px;
  --fs-40: 40px;
  --fs-48: 48px;  /* Onest SemiBold 48 — hero */
  --fs-63: 63px;  /* Onest SemiBold 63 — mega */

  --lh-tight:  1.05;
  --lh-snug:   1.15;
  --lh-normal: 1.35;
  --lh-loose:  1.55;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.02em;

  /* Motion */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   320ms;
}

/* =========================================================
   Semantic element styles — plug-and-play baseline
   ========================================================= */

.ds-display-xl,
h1.ds, .ds h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-63);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-primary);
}

.ds-display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-48);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-primary);
}

.ds-h1,
h2.ds, .ds h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-34);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-primary);
}

.ds-h2,
h3.ds, .ds h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-30);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.ds-h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-26);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.ds-h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-20);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.ds-body-lg,
p.ds, .ds p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-24);
  line-height: var(--lh-normal);
  color: var(--fg-secondary);
}

.ds-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  color: var(--fg-secondary);
}

.ds-body-sm {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
  color: var(--fg-secondary);
}

.ds-caption {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fs-12);
  line-height: var(--lh-normal);
  color: var(--fg-muted);
}

.ds-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-14);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.ds-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
  color: var(--fg-primary);
}

code.ds {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--ink-100);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--purple-700);
}
