/* FLOAT.MARKT — Foundations
 * Colors, typography, spacing, radii, shadows.
 * Import once at the top of any page:
 *   <link rel="stylesheet" href="../colors_and_type.css">
 */

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

:root {
  /* ========== BACKGROUNDS (Stealth Premium: near-black, cool undertone) ========== */
  --fm-bg-0: oklch(0.11 0.005 240);     /* page bg */
  --fm-bg-1: oklch(0.145 0.006 240);    /* surface — nav, footer, sidebar */
  --fm-bg-2: oklch(0.185 0.007 240);    /* card */
  --fm-bg-3: oklch(0.235 0.008 240);    /* elevated / selected */
  --fm-bg-4: oklch(0.29 0.009 240);     /* hover / active */

  /* ========== BORDERS ========== */
  --fm-line: oklch(0.28 0.008 240);
  --fm-line-soft: oklch(0.22 0.007 240 / 0.6);
  --fm-line-strong: oklch(0.42 0.01 240);

  /* ========== TEXT / INK ========== */
  --fm-ink: oklch(0.97 0.005 240);      /* primary */
  --fm-ink-2: oklch(0.78 0.007 240);    /* secondary */
  --fm-ink-3: oklch(0.58 0.008 240);    /* muted / labels */
  --fm-ink-4: oklch(0.42 0.008 240);    /* very dim */

  /* ========== ACCENT — ELECTRIC GREEN (trust · money · gaming) ========== */
  --fm-acc: oklch(0.88 0.24 145);
  --fm-acc-dim: oklch(0.72 0.20 145);
  --fm-acc-glow: oklch(0.88 0.24 145 / 0.15);
  --fm-acc-ink: oklch(0.14 0.02 145);   /* text on accent */

  /* ========== SEMANTIC ========== */
  --fm-ok: oklch(0.82 0.20 155);
  --fm-warn: oklch(0.78 0.16 75);
  --fm-err: oklch(0.68 0.22 25);
  --fm-info: oklch(0.75 0.15 230);

  /* ========== CS2 RARITY SCALE ========== */
  --fm-rar-consumer: oklch(0.75 0.02 240);
  --fm-rar-industrial: oklch(0.72 0.14 230);
  --fm-rar-milspec: oklch(0.62 0.20 265);
  --fm-rar-restricted: oklch(0.62 0.24 295);
  --fm-rar-classified: oklch(0.68 0.26 335);
  --fm-rar-covert: oklch(0.62 0.24 25);
  --fm-rar-knife: oklch(0.78 0.18 75);

  /* ========== TYPE ========== */
  --fm-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fm-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* ========== SPACING (4pt base) ========== */
  --fm-s-1: 4px;
  --fm-s-2: 8px;
  --fm-s-3: 12px;
  --fm-s-4: 16px;
  --fm-s-5: 20px;
  --fm-s-6: 24px;
  --fm-s-8: 32px;
  --fm-s-10: 40px;
  --fm-s-12: 48px;
  --fm-s-14: 56px;
  --fm-s-16: 64px;
  --fm-s-20: 80px;

  /* ========== RADII ========== */
  --fm-r-1: 4px;   /* chips, small buttons */
  --fm-r-2: 6px;   /* inputs, medium buttons */
  --fm-r-3: 8px;   /* standard cards */
  --fm-r-4: 12px;  /* feature cards, modals */

  /* ========== SHADOWS ========== */
  --fm-sh-1: 0 1px 2px rgba(0,0,0,.4);
  --fm-sh-2: 0 4px 16px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.4);
  --fm-sh-3: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4);
  --fm-acc-shadow: 0 0 0 1px oklch(0.88 0.24 145 / 0.3), 0 8px 24px oklch(0.88 0.24 145 / 0.15);
}

/* ========== SEMANTIC TYPE ROLES ========== */

/* Display — hero headlines, 3-line max */
.fm-display {
  font-family: var(--fm-sans);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--fm-ink);
}

/* H1 — page headers */
.fm-h1 {
  font-family: var(--fm-sans);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--fm-ink);
}

/* H2 — section headers */
.fm-h2 {
  font-family: var(--fm-sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--fm-ink);
}

/* H3 — card / subsection headers */
.fm-h3 {
  font-family: var(--fm-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--fm-ink);
}

/* Body — default paragraph text */
.fm-body {
  font-family: var(--fm-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.55;
  color: var(--fm-ink-2);
  font-feature-settings: "ss01", "cv11";
}

/* Small — captions, meta */
.fm-small {
  font-family: var(--fm-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fm-ink-2);
}

/* Mono L — big prices, KPI values */
.fm-mono-l {
  font-family: var(--fm-mono);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--fm-ink);
}

/* Mono M — inline mono numbers, floats, IDs */
.fm-mono-m {
  font-family: var(--fm-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--fm-ink);
}

/* Label — section labels, badges (§04 / MARKETPLACE) */
.fm-label {
  font-family: var(--fm-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fm-ink-3);
}
.fm-label--acc { color: var(--fm-acc); }

/* Price — always mono + accent + tabular */
.fm-price {
  font-family: var(--fm-mono);
  font-weight: 600;
  color: var(--fm-acc);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Float value — always mono, 8 decimals */
.fm-float {
  font-family: var(--fm-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: var(--fm-ink);
}

/* ========== GLOBAL HELPERS ========== */

.fm-tabular { font-variant-numeric: tabular-nums; }
.fm-mono { font-family: var(--fm-mono); font-feature-settings: "zero","ss01"; }
.fm-sans { font-family: var(--fm-sans); }

/* Marquee — live ticker */
@keyframes fm-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fm-marquee-track { display: inline-flex; animation: fm-marquee 60s linear infinite; }

/* Pulse — live signals, bot status, alerts */
@keyframes fm-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.fm-pulse { animation: fm-pulse 2s ease-in-out infinite; }

/* Body baseline */
.fm-page {
  background: var(--fm-bg-0);
  color: var(--fm-ink);
  font-family: var(--fm-sans);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01","cv11";
}

/* Selection */
.fm-page ::selection { background: var(--fm-acc); color: var(--fm-acc-ink); }

/* Focus ring — keyboard nav only */
.fm-page :focus-visible {
  outline: 2px solid var(--fm-acc);
  outline-offset: 2px;
}
