/* FLINZ Design System — Colors & Type
 * ────────────────────────────────────
 * Sourced from `Peter-Flinz/UI-Design` (shadcn/ui, `baseColor: neutral`).
 * Hex values below are derived from the HSL tokens in `app/globals.css`.
 *
 * Brand direction: minimalist, black & white, editorial. No accent color.
 * Meaning is carried by weight, scale, and negative space — not hue.
 */

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

:root {
  /* ── Neutrals (the system) ─────────────────────────────────── */
  --fg:           #0a0a0a;   /* hsl(0 0% 3.9%)  — primary text, primary button bg */
  --fg-muted:     #737373;   /* hsl(0 0% 45.1%) — secondary / placeholder text */
  --fg-subtle:    #a3a3a3;   /* mid-gray — icons, meta */
  --fg-on-dark:   #fafafa;   /* hsl(0 0% 98%) — text on black */

  --bg:           #ffffff;   /* canvas */
  --bg-muted:     #f5f5f5;   /* hsl(0 0% 96.1%) — secondary, muted, accent bg */
  --bg-sidebar:   #fafafa;   /* hsl(0 0% 98%) — sidebar background */
  --bg-overlay:   rgba(255,255,255,0.80);

  --border:       #e5e5e5;   /* hsl(0 0% 89.8%) — hairline */
  --border-strong:#d4d4d4;
  --ring:         #0a0a0a;   /* focus outline, matches fg */

  /* ── Accent (the only hue in the system) ───────────────────── */
  --accent:       #e6b800;   /* FLINZ-ochre — "needs attention" + rare emphasised action */
  --accent-fg:    #0a0a0a;
  /* No destructive red, no success green. Destructive actions reuse the
     accent (FLINZ-ochre) — the only coloured button in the system.
     Status that isn't "needs attention" uses --fg-muted. Signal success
     through weight, copy, and iconography — never green. */
  --destructive:  var(--accent);
  --destructive-fg:var(--accent-fg);

  /* ── Primary / Secondary shortcuts (shadcn parity) ─────────── */
  --primary:              var(--fg);
  --primary-foreground:   var(--fg-on-dark);
  --secondary:            var(--bg-muted);
  --secondary-foreground: var(--fg);
  --muted:                var(--bg-muted);
  --muted-foreground:     var(--fg-muted);
  --accent:               var(--bg-muted);
  --accent-foreground:    var(--fg);
  --card:                 var(--bg);
  --card-foreground:      var(--fg);

  /* ── Type stack ────────────────────────────────────────────── */
  /* Product UI uses Inter. Wilma uses its own hand-drawn brush wordmark
     which is always used as the PNG asset, never set as a webfont. */
  --font-sans:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-wilma-fallback: 'Caveat', 'Kalam', cursive;  /* only if PNG unavailable */

  /* Display type = FLINZ wordmark style: very tight letter-spacing,
     extra-bold, uppercase. Inter @ 800/900 is the closest free match to
     the custom geometric sans used in the FLINZ banner logo. */
  --display-tracking: -0.04em;
  --heading-tracking: -0.02em;
  --body-tracking:    -0.005em;

  /* ── Type scale (product UI) ──────────────────────────────── */
  --text-xs:   12px;   --lh-xs: 16px;
  --text-sm:   14px;   --lh-sm: 20px;   /* body default (shadcn) */
  --text-base: 16px;   --lh-base: 24px;
  --text-lg:   18px;   --lh-lg: 28px;
  --text-xl:   20px;   --lh-xl: 28px;
  --text-2xl:  24px;   --lh-2xl: 32px;  /* page H1 (dashboard) */
  --text-3xl:  30px;   --lh-3xl: 36px;
  --text-4xl:  36px;   --lh-4xl: 40px;
  --text-5xl:  48px;   --lh-5xl: 1;
  --text-display: 72px; --lh-display: 1;

  /* ── Spacing (4-px grid, Tailwind-aligned) ────────────────── */
  --space-0: 0;
  --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-24: 96px;

  /* ── Radius (shadcn `--radius: 0.5rem`) ──────────────────── */
  --radius-sm: 4px;   /* rounded-sm = radius - 4 */
  --radius-md: 6px;   /* rounded-md = radius - 2 */
  --radius-lg: 8px;   /* rounded-lg = radius    */
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* ── Elevation ────────────────────────────────────────────── */
  --shadow-xs:  0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 3px 0 rgba(0,0,0,0.08), 0 1px 2px -1px rgba(0,0,0,0.08);   /* shadow-sm */
  --shadow:     0 1px 3px 0 rgba(0,0,0,0.10), 0 1px 2px -1px rgba(0,0,0,0.10);   /* card default */
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.08);  /* hover:shadow-md */
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.10);

  /* ── Layout ───────────────────────────────────────────────── */
  --sidebar-w-collapsed: 64px;
  --sidebar-w-expanded:  256px;
  --header-h: 64px;
  --container-max: 1280px;
}

/* ── Semantic element styles ─────────────────────────────────── */

html, body {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  letter-spacing: var(--body-tracking);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Display — used for hero / marketing / large numbers in dashboards */
.display {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: var(--text-display);
  line-height: var(--lh-display);
  letter-spacing: var(--display-tracking);
}

/* FLINZ wordmark style — ALL CAPS, ultra-tight */
.wordmark {
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: var(--lh-2xl);
  letter-spacing: var(--heading-tracking);
}

h2, .h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--lh-xl);
  letter-spacing: var(--heading-tracking);
}

h3, .h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  letter-spacing: var(--heading-tracking);
}

/* Section eyebrow / label — small caps, high tracking */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

p, .body {
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--fg);
}

.body-lg { font-size: var(--text-base); line-height: var(--lh-base); }
.body-sm { font-size: var(--text-xs);  line-height: var(--lh-xs);  }

.muted {
  color: var(--fg-muted);
}

.meta {
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--fg-muted);
}

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

/* Focus ring — shadcn style, 1px inside the component */
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring);
}
