/* ============================================================
 * Sertão Tech — Design System
 * Global entry point. Consumers link THIS file only.
 *
 * GENERATED FILE — do not edit directly.
 * Source of truth is ds/tokens/*.css. After editing a token file, run:
 *   ./scripts/build-ds.sh
 * to regenerate this file, then commit both.
 * ============================================================ */

/* Sertão Tech — Color System
 * Sampled from the brand badge: espresso brown structure, burnt-orange sertão
 * mountains, golden sun, and warm cream "paper". Neutrals are intentionally warm
 * (never pure grey/white). Status colors are harmonized to the desert palette.
 */
:root {
  /* ---- Sand / warm neutrals (paper → gold) ---- */
  --sand-50:  #FBF6EA;
  --sand-100: #F5EAD0;
  --sand-200: #EEDCB2;
  --sand-300: #E2C88C;
  --sand-400: #CFAE6B;
  --sand-500: #B8925A;

  /* ---- Espresso / ink & dark surfaces (from the badge outline) ---- */
  --espresso-950: #1F1305;
  --espresso-900: #2A1908;
  --espresso-800: #3C210B; /* the logo's border brown — primary ink */
  --espresso-700: #4E2E13;
  --espresso-600: #6B4526;
  --espresso-500: #8A6440;
  --espresso-400: #A5875E;

  /* ---- Amber / the sun (golden highlight) ---- */
  --amber-100: #FBEBC8;
  --amber-300: #F6C56C; /* the wordmark gold */
  --amber-400: #EDA83E;
  --amber-500: #D87D0E; /* the sun */
  --amber-600: #B4670B;

  /* ---- Terracotta / the sertão mountains (primary brand fill) ---- */
  --terra-100: #F4E0C6;
  --terra-400: #CE7A2E;
  --terra-500: #BC5E1A; /* bright terracotta — decorative fills */
  --terra-600: #A8511A; /* primary action (AA with cream text) */
  --terra-700: #8A4015;

  /* ---- Status (desert-harmonized) ---- */
  --cactus-100: #E7EDD3; --cactus-500: #5E7A32; --cactus-600: #4C6329; /* success */
  --honey-100:  #F7E8C4; --honey-500:  #C88A12; --honey-600:  #A87310; /* warning */
  --brick-100:  #F6DCD1; --brick-500:  #B23A20; --brick-600:  #97301A; /* danger  */
  --agave-100:  #D2E7E2; --agave-500:  #2E7A6F; --agave-600:  #245F57; /* info    */
  --honey-700: #7A5208; /* text on honey-100, 5.69:1 — honey-600 only reaches 3.37:1 */

  /* ---- Blue / the "palestrante" chart series, for tags in the painel ---- */
  --blue-100: #D9E6F2;
  --blue-700: #154F82; /* text on blue-100, 6.69:1 */

  /* ---- Darker steps for text on soft fills ---- */
  --amber-700: #7A4A06; /* text on amber-100, 6.34:1 */

  /* ---- Painel: sponsorship funnel (bg / fg), cold -> warm -> success.
          Color is never the only signal: the tag also carries a step marker. ---- */
  --funnel-1-bg: var(--sand-200);   --funnel-1-fg: var(--espresso-700); /* Prospecção        9.00:1 */
  --funnel-2-bg: var(--agave-100);  --funnel-2-fg: var(--agave-600);    /* Proposta enviada  5.71:1 */
  --funnel-3-bg: var(--honey-100);  --funnel-3-fg: var(--honey-700);    /* Negociação        5.69:1 */
  --funnel-4-bg: var(--amber-100);  --funnel-4-fg: var(--amber-700);    /* Fechado           6.34:1 */
  --funnel-5-bg: var(--terra-100);  --funnel-5-fg: var(--terra-700);    /* Contrato assinado 5.78:1 */
  --funnel-6-bg: var(--cactus-100); --funnel-6-fg: var(--cactus-600);   /* Pago              5.59:1 */

  /* ---- Painel: expense status ---- */
  --expense-planned-bg: var(--sand-200);    --expense-planned-fg: var(--espresso-700);  /* 9.00:1 */
  --expense-committed-bg: var(--honey-100); --expense-committed-fg: var(--honey-700);   /* 5.69:1 */
  --expense-paid-bg: var(--cactus-100);     --expense-paid-fg: var(--cactus-600);       /* 5.59:1 */
  --expense-overdue-bg: var(--brick-100);   --expense-overdue-fg: var(--brick-600);     /* 5.84:1 */

  /* ---- Painel: budget execution bar ---- */
  --exec-paid: var(--terra-700);
  --exec-committed: var(--terra-400);
  --exec-track: var(--sand-200);
  --exec-over: var(--brick-500);

  /* ================= Semantic aliases ================= */
  /* Surfaces */
  --surface-page:      var(--sand-100);   /* warm cream — the desert day */
  --surface-card:      var(--sand-50);    /* lighter paper — cards lift up */
  --surface-sunken:    var(--sand-200);   /* wells, insets */
  --surface-hover:     #EFE1C0;           /* subtle hover tint on cream */
  --surface-ink:       var(--espresso-800); /* dark brown panels (the badge) */
  --surface-ink-deep:  var(--espresso-950);
  --surface-brand:     var(--terra-500);
  --surface-accent:    var(--amber-500);

  /* Text */
  --text-strong:       var(--espresso-900);
  --text-body:         var(--espresso-800);
  --text-muted:        var(--espresso-600); /* AA on sand-100/200 (was espresso-500, ~4.4:1 — failed PageSpeed contrast audit) */
  --text-subtle:       var(--espresso-500);
  --text-on-ink:       var(--sand-100);   /* cream text on brown */
  --text-on-ink-muted: #C9AE7E;
  --text-on-brand:     #FFF8EC;           /* cream text on terracotta */
  --text-on-accent:    var(--espresso-900); /* dark text on amber/gold */
  --text-link:         var(--terra-600);
  --text-link-hover:   var(--terra-700);

  /* Borders */
  --border-subtle:  rgba(60,33,11,0.12);
  --border-default: var(--sand-400);
  --border-strong:  var(--sand-500);
  --border-ink:     rgba(60,33,11,0.85);   /* hard badge outlines */
  --border-on-ink:  rgba(245,234,208,0.16);

  /* Status semantic */
  --success: var(--cactus-500); --success-fg:#FBF6EA; --success-soft:var(--cactus-100);
  --warning: var(--honey-500);  --warning-fg:var(--espresso-900); --warning-soft:var(--honey-100);
  --danger:  var(--brick-500);  --danger-fg:#FBF6EA; --danger-soft:var(--brick-100);
  --info:    var(--agave-500);  --info-fg:#FBF6EA; --info-soft:var(--agave-100);

  /* Brand action (terracotta primary — AA with cream text) */
  --brand-primary:        var(--terra-600);
  --brand-primary-hover:  var(--terra-700);
  --brand-primary-active: #6F340F;
  --brand-primary-soft:   var(--terra-100);
  --brand-ink:            var(--espresso-800);

  /* Focus */
  --focus-ring: var(--amber-500);
}

/* Sertão Tech — Typography tokens */
:root {
  /* Families */
  --font-display: "Space Grotesk", "Outfit", system-ui, sans-serif;
  --font-body:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-wordmark:"League Spartan", "Space Grotesk", system-ui, sans-serif; /* the SERTÃO TECH lockup — set uppercase */
  /* Semantic */
  --font-heading: var(--font-display);
  --font-ui:      var(--font-body);
  --font-code:    var(--font-mono);

  /* Size scale */
  --text-2xs: 0.6875rem; /* 11 */
  --text-xs:  0.75rem;   /* 12 */
  --text-sm:  0.875rem;  /* 14 */
  --text-base:1rem;      /* 16 */
  --text-lg:  1.125rem;  /* 18 */
  --text-xl:  1.25rem;   /* 20 */
  --text-2xl: 1.5rem;    /* 24 */
  --text-3xl: 1.875rem;  /* 30 */
  --text-4xl: 2.375rem;  /* 38 */
  --text-5xl: 3rem;      /* 48 */
  --text-6xl: 4rem;      /* 64 */
  --text-7xl: 5rem;      /* 80 */

  /* Weights */
  --fw-regular: 400; /* @kind font */
  --fw-medium: 500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700; /* @kind font */

  /* Line height */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.06em;
  --tracking-caps: 0.14em; /* rustic uppercase eyebrows/labels */
}

/* Sertão Tech — Spacing scale (4px base) */
:root {
  --space-0: 0;
  --space-1: 0.25rem;  /* 4  */
  --space-2: 0.5rem;   /* 8  */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-10: 2.5rem;  /* 40 */
  --space-12: 3rem;    /* 48 */
  --space-16: 4rem;    /* 64 */
  --space-20: 5rem;    /* 80 */
  --space-24: 6rem;    /* 96 */
  --space-32: 8rem;    /* 128 */

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 760px;
  --gutter: var(--space-6);
}

/* Sertão Tech — Corner radii
 * The brand mark is a stadium/capsule badge, so the system leans on generous,
 * friendly rounding, with a full pill for interactive controls.
 */
:root {
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;  /* buttons, chips, tags — echoes the badge */

  /* Semantic */
  --radius-control: var(--radius-pill);
  --radius-card: var(--radius-lg);
  --radius-field: var(--radius-md);
}

/* Sertão Tech — Elevation
 * Shadows are warm (espresso-tinted), never neutral grey. The signature
 * "badge" shadow is a hard, offset sticker shadow used with an ink border for
 * emphasis moments — it recalls a printed patch / enamel pin.
 */
:root {
  --shadow-xs: 0 1px 2px rgba(60,33,11,0.10);
  --shadow-sm: 0 2px 6px rgba(60,33,11,0.12);
  --shadow-md: 0 6px 18px rgba(60,33,11,0.14);
  --shadow-lg: 0 16px 40px rgba(60,33,11,0.18);
  --shadow-xl: 0 28px 64px rgba(60,33,11,0.22);

  /* Signature hard "sticker/badge" shadow — pair with a --border-ink outline */
  --shadow-badge-sm: 3px 3px 0 var(--border-ink);
  --shadow-badge: 5px 5px 0 var(--border-ink);
  --shadow-badge-accent: 5px 5px 0 var(--terra-600);

  /* Focus */
  --shadow-focus: 0 0 0 3px rgba(216,125,14,0.45);
  --shadow-inset: inset 0 2px 4px rgba(60,33,11,0.10);
}

/* Sertão Tech — Motion
 * Warm and welcoming ("dê o primeiro passo"): quick ease-outs with an
 * occasional gentle overshoot on entrances. Never long or showy.
 */
:root {
  --dur-fast: 120ms; /* @kind other */
  --dur-base: 200ms; /* @kind other */
  --dur-slow: 320ms; /* @kind other */
  --dur-slower: 500ms; /* @kind other */

  --ease-standard: cubic-bezier(0.2, 0.6, 0.2, 1); /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --ease-in: cubic-bezier(0.4, 0, 1, 1); /* @kind other */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1); /* @kind other */ /* gentle welcoming overshoot */
}

/* Sertão Tech — Base element defaults
 * Sensible, on-brand defaults consumers get for free. Kept minimal — tokens do
 * the heavy lifting. Not a reset framework.
 */
:root {
  color-scheme: light;
  --selection-bg: var(--amber-300);
  --selection-fg: var(--espresso-900);
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
p { text-wrap: pretty; }
code, kbd, pre, samp { font-family: var(--font-mono); }

/* Links — brand terracotta, never browser blue */
a { color: var(--text-link); text-decoration-color: color-mix(in srgb, var(--text-link) 40%, transparent); text-underline-offset: 2px; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--text-link-hover); text-decoration-color: currentColor; }

::selection { background: var(--selection-bg); color: var(--selection-fg); }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }

/* Eyebrow / kicker label — a recurring rustic motif */
.st-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--terra-600);
}

