/* =========================================================
   Pickfut — Tianguis palette (terracotta + teal)
   Token names are kept (--purple-*, etc.) so existing
   components don't need to change; only the *values* shift.
   ========================================================= */

@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 {
  /* ------------------------------------------------------
     BRAND RAMP — terracotta (was purple)
     ------------------------------------------------------ */
  --purple-50:  rgb(255, 241, 232); /* palest wash */
  --purple-100: rgb(254, 233, 218);
  --purple-150: rgb(253, 215, 189);
  --purple-200: rgb(251, 181, 139); /* illustration highlights */
  --purple-300: rgb(246, 149, 102);
  --purple-400: rgb(232,  84,  42); /* PRIMARY — terracotta */
  --purple-500: rgb(211,  68,  24);
  --purple-600: rgb(180,  62,  28); /* deep press */
  --purple-700: rgb(142,  46,  20);
  --purple-800: rgb( 95,  30,  13);
  --purple-900: rgb( 42,  31,  26); /* same as ink-900 */

  /* ------------------------------------------------------
     ACCENTS
     ------------------------------------------------------ */
  /* Marigold — the "champion" / bonus highlight */
  --yellow-100: rgb(255, 244, 214);
  --yellow-200: rgb(255, 232, 154);
  --yellow-300: rgb(255, 222, 115);
  --yellow-400: rgb(251, 192,  45);
  --yellow-500: rgb(226, 161,   0);
  --yellow-600: rgb(187, 132,   0);

  /* Emerald — success. Pushed slightly bluer to widen the gap
     from terracotta in deuteranopia + protanopia. */
  --green-100: rgb(216, 240, 228);
  --green-200: rgb(180, 224, 204);
  --green-300: rgb(110, 194, 158);
  --green-400: rgb( 16, 161, 105);

  /* Teal — secondary actions, deltas. Was "orange-*" in Baubap. */
  --orange-400: rgb( 15, 143, 143);
  --orange-500: rgb( 11, 120, 120);

  /* Warm danger red — darkened to widen the luminance gap from
     the terracotta primary (color-blind safety). */
  --red-400:   rgb(127,  29,  29);

  /* Slightly warmer blue (kept for any blue-coded accents) */
  --blue-400:  rgb( 63,  97, 192);

  /* ------------------------------------------------------
     NEUTRALS — warm-toned (was cool inks)
     ------------------------------------------------------ */
  --ink-900: rgb( 42,  31,  26); /* warm black */
  --ink-800: rgb( 77,  61,  51);
  --ink-700: rgb( 92,  77,  64);
  --ink-500: rgb(154, 142, 132); /* borders, disabled */
  --ink-300: rgb(220, 211, 203);
  --ink-100: rgb(250, 246, 241); /* warm 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);
  --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
     ------------------------------------------------------ */
  --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
     ------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(42,31,26,0.06), 0 1px 1px rgba(42,31,26,0.04);
  --shadow-md: 0 4px 12px rgba(42,31,26,0.08), 0 2px 4px rgba(42,31,26,0.04);
  --shadow-lg: 0 12px 32px rgba(42,31,26,0.10), 0 4px 8px rgba(42,31,26,0.06);
  --shadow-xl: 0 24px 48px rgba(42,31,26,0.14), 0 8px 16px rgba(42,31,26,0.08);
  --shadow-illustration: 1px 1px 2px rgba(0,0,0,0.2);
  --shadow-brand: 0 8px 24px rgba(232,84,42,0.28);

  /* ------------------------------------------------------
     TYPE
     ------------------------------------------------------ */
  --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;

  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-26: 26px;
  --fs-28: 28px;
  --fs-30: 30px;
  --fs-34: 34px;
  --fs-40: 40px;
  --fs-48: 48px;
  --fs-63: 63px;

  --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);
}
