/* ============================================================
   Micronotes.ai — Colors & Type
   Source: campaign_manager_prototype (Next.js + Tailwind + shadcn)
   Primary brand color: #982E69  (deep magenta/plum)
   Secondary accent:    #EA6326  (warm orange)
   Type system: DM Sans (variable, sans), with Roboto for some
   email/direct-mail editor surfaces.
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dm-sans-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* DM Sans is also pulled from Google Fonts at runtime for the full
   weight range; this @import lets cards/slides render correctly even
   when the local file isn't available. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=Roboto:wght@300;400;500&display=swap");

:root {
  /* ---------- Brand ---------- */
  --brand-primary: #982E69;        /* rgb(152, 46, 105) — plum */
  --brand-primary-rgb: 152, 46, 105;
  --brand-primary-dark: #7e2657;   /* hover */
  --brand-primary-darker: #671f47; /* pressed */
  --brand-primary-10: rgba(152, 46, 105, 0.10);
  --brand-primary-20: rgba(152, 46, 105, 0.20);
  --brand-primary-30: rgba(152, 46, 105, 0.30);

  --brand-secondary: #EA6326;      /* rgb(233, 99, 39) — warm orange */
  --brand-secondary-rgb: 233, 99, 39;
  --brand-secondary-10: rgba(233, 99, 39, 0.10);

  /* Plum tints used in dashboard funnel gradients */
  --plum-50:  #f9e7f2;
  --plum-100: #f2d1e6;
  --plum-200: #e6add0;
  --plum-300: #c96aa7;
  --plum-400: #ac4d8a;
  --plum-500: #982E69;

  /* Orange tints (direct-mail funnel) */
  --orange-50:  #fff5eb;
  --orange-100: #ffe8d9;
  --orange-200: #f9a878;
  --orange-300: #EA6326;

  /* ---------- Neutrals (Tailwind slate + gray) ---------- */
  --bg-app:        #f8fafc; /* slate-50 — global app background */
  --bg-surface:    #ffffff; /* white card surface */
  --bg-muted:      #f1f5f9; /* slate-100 */
  --bg-subtle:     #fcfcfd; /* striped row */

  --fg-strong:     #0f172a; /* slate-900-ish (heading) */
  --fg-default:    #1f2937; /* gray-800 (body) */
  --fg-muted:      #6b7280; /* gray-500 */
  --fg-subtle:     #9ca3af; /* gray-400 */
  --fg-disabled:   #d1d5db; /* gray-300 */

  --border-default: #e5e7eb; /* gray-200 */
  --border-strong:  #cbd5e1; /* slate-300 */
  --border-subtle:  #f3f4f6; /* gray-100 */

  /* ---------- Semantic ---------- */
  --success: #22c55e;       /* green-500 */
  --success-bg: #f0fdf4;    /* green-50 */
  --success-fg: #15803d;    /* green-700 */

  --warning: #f59e0b;       /* amber-500 */
  --warning-bg: #fffbeb;
  --warning-fg: #92400e;

  --danger:  #ef4444;       /* red-500 */
  --danger-strong: #f05252; /* used in login alerts */
  --danger-bg: #fef2f2;
  --danger-fg: #b91c1c;

  --info: #3b82f6;          /* blue-500 */
  --info-bg: #eff6ff;
  --info-fg: #1d4ed8;

  /* ---------- Radii (Tailwind extend uses --radius) ---------- */
  --radius-sm: 4px;
  --radius:    8px;     /* default */
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;    /* login card */
  --radius-full: 9999px;

  /* ---------- Shadows (very soft; cards are elevation-light) ---------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow:    0 4px 6px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-brand: 0 2px 8px rgba(152, 46, 105, 0.20);
  --ring-brand:  0 0 0 3px rgba(152, 46, 105, 0.10);

  /* ---------- Spacing (Tailwind 4px scale) ---------- */
  --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;

  /* ---------- Type ---------- */
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-roboto: "Roboto", var(--font-sans);

  /* Sizes — driven by px values seen across pages */
  --text-xs:   11px;
  --text-sm:   13px;     /* table cell */
  --text-base: 14px;     /* body */
  --text-md:   15px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  20px;
  --text-3xl:  24px;     /* page title */
  --text-4xl:  30px;
  --text-5xl:  36px;

  --leading-tight: 1.15;
  --leading-snug:  1.35;
  --leading-normal:1.5;

  --tracking-tight:  -0.02em;  /* page titles */
  --tracking-normal:  0;
  --tracking-wide:    0.05em;  /* table column headers */

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;
}

/* ============================================================
   Semantic typography classes
   ============================================================ */

.h-display {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}

.h1, h1.app {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xl);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}

.h2, h2.app {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
  line-height: 1.25;
  color: var(--fg-strong);
}

.h3, h3.app {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xl);
  line-height: 1.3;
  color: var(--fg-strong);
}

.h4, h4.app, .card-title {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  line-height: 1.35;
  color: var(--fg-strong);
}

.tile-title {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: #374151; /* gray-700 */
}

.metric-number {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: 24px;
  line-height: 1.1;
  color: var(--fg-strong);
}

.metric-label {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  color: var(--fg-muted);
}

.body, p.app {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg-default);
}

.caption {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 12px;
  color: var(--fg-muted);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.code, .mono {
  font-family: var(--font-mono);
  font-size: 13px;
}
