/* ═══════════════════════════════════════════════
   Numeris Math — marketable desktop prototype
   Scholarly adventure: calm slate, parchment, jewel accents
   ═══════════════════════════════════════════════ */

:root {
  /* ── Parchment / vellum base ── */
  --bg: #132238;                       /* deep study blue behind the page */
  --bg-parchment: #f1e2bf;             /* aged parchment */
  --bg-parchment-deep: #e4cf9f;        /* shadowed vellum */
  --bg-card: #f7ebce;                  /* fresh parchment for cards */
  --bg-card-edge: #c9a76a;             /* tea-stained edge */

  /* ── Ink tones ── */
  --ink: #2b1d0e;                      /* iron-gall ink */
  --ink-soft: #4a3420;                 /* faded ink */
  --ink-muted: #7a5a36;                /* rubric brown */
  --ink-faint: #a98859;                /* dust */

  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--ink-muted);

  /* ── Royal accents ── */
  --gold: #c9a24a;                     /* burnished gold */
  --gold-bright: #f4cc5d;               /* highlight */
  --gold-deep: #8a6a20;                  /* shadow */
  --crimson: #8b2d3f;
  --crimson-bright: #c24d62;
  --sapphire: #2a5f8f;
  --emerald: #2f6a3a;

  /* ── Topic sigils — jewel tones on parchment ── */
  --patterns: #2a4a8b;                  /* sapphire */
  --patterns-light: #dfe5f2;
  --patterns-dark: #1b3260;

  --geometry: #a33a1f;                  /* ember */
  --geometry-light: #f6dcd0;
  --geometry-dark: #6e2311;

  --operations: #2f6a6a;                /* teal-verdigris */
  --operations-light: #d8e8e6;
  --operations-dark: #184242;

  --logic: #5b3a86;                     /* amethyst */
  --logic-light: #e3d8ef;
  --logic-dark: #3b2258;

  --prealgebra: #b5671a;                /* copper */
  --prealgebra-light: #f4dfbe;
  --prealgebra-dark: #7a3f08;

  --probability: #9b2b5c;               /* wine */
  --probability-light: #f2d4e0;
  --probability-dark: #621638;

  --coordinates: #3f6b2f;               /* moss */
  --coordinates-light: #dde8cf;
  --coordinates-dark: #27471a;

  --fractions: #2d5c88;                 /* lapis */
  --fractions-light: #d4e0ec;
  --fractions-dark: #183856;

  --numbertheory: #6a3b8b;              /* iris */
  --numbertheory-light: #e4d6ef;
  --numbertheory-dark: #432258;

  /* ── Feedback ── */
  --correct: #3f6b2f;
  --correct-light: #dde8cf;
  --incorrect: #a33a1f;
  --incorrect-light: #f6dcd0;

  /* ── Stars / XP ── */
  --star-gold: #d4a017;
  --star-empty: #b89a6a;

  /* ── Shadows (parchment is flat — use ink-shadows sparingly) ── */
  --shadow-sm: 0 1px 0 rgba(74, 52, 32, 0.15), 0 2px 4px rgba(43, 29, 14, 0.08);
  --shadow-md: 0 2px 0 rgba(74, 52, 32, 0.18), 0 6px 14px rgba(43, 29, 14, 0.18);
  --shadow-lg: 0 4px 0 rgba(74, 52, 32, 0.22), 0 16px 32px rgba(43, 29, 14, 0.28);
  --shadow-inset: inset 0 0 40px rgba(122, 90, 54, 0.18);

  /* ── Radii (less rounded — more chiseled) ── */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  /* ── Spacing ── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* ── Fonts ── */
  --font-display: 'Cinzel', Georgia, serif;
  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Spectral', Georgia, serif;

  /* ── Font sizes ── */
  --text-xs: 0.78rem;
  --text-sm: 0.9rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.6rem;
  --text-3xl: 2.1rem;
  --text-4xl: 2.8rem;
  --text-5xl: 3.6rem;

  /* ── Motion ── */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* ── Textures (reusable backgrounds) ── */
  --tex-parchment:
    repeating-linear-gradient(0deg, rgba(138,106,32,0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #f5e6c6 0%, #ecd29c 100%);

  --tex-vignette:
    radial-gradient(ellipse at center, transparent 55%, rgba(45, 25, 10, 0.35) 100%);
}
