/* ============================================================
   GLOAM — Design Tokens
   Theme: under the city. Cut stone, wet air, and one flame.
   Committed dark surface; there is no light mode down a stairwell.
   ============================================================ */

:root {
  /* ---- Core palette -------------------------------------- */
  --soot-900: #0B0907; /* the dark past the light — page floor */
  --soot-800: #12100C; /* deepest panel wells */
  --soot-700: #1A1712; /* wet stone — primary surface */
  --soot-600: #241F18; /* raised surface */
  --soot-500: #33291E; /* stone in reach of the flame */
  --soot-400: #4A3A29; /* stone the torch is actually on */

  /* Firelight — the only real light source down here */
  --ember: #FF8A3D;
  --ember-dim: #A8501F;
  --ember-glow: rgba(255, 138, 61, 0.35);
  --moss: #86C051;      /* lichen, safe ground, healing */
  --moss-dim: #4C7130;
  --moss-glow: rgba(134, 192, 81, 0.3);
  --gold: #F2C14E;      /* relics, rare tier, warnings */
  --violet: #9A6BD1;    /* Gloam / danger tier */

  /* ---- Text ---------------------------------------------- */
  --ink-100: #F6EFE4; /* headings — lamplit parchment */
  --ink-200: #DDD0BE; /* body */
  --ink-300: #A9998A; /* secondary */
  --ink-400: #7C6C5D; /* muted / captions */
  --ink-500: #52463B; /* disabled, hairlines */

  /* ---- Lines & glass ------------------------------------- */
  --line-hair: rgba(169, 153, 138, 0.14);
  --line-soft: rgba(169, 153, 138, 0.24);
  --line-ember: rgba(255, 138, 61, 0.38);
  --glass: rgba(26, 23, 18, 0.58);
  --glass-raised: rgba(36, 31, 24, 0.74);
  --glass-blur: 14px;

  /* ---- Typography ---------------------------------------- */
  /* Overridden by fonts.css once the self-hosted faces load; this is
     the stack that stands if they never arrive. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --fs-xs: 0.6875rem;  /* 11px — carved labels */
  --fs-sm: 0.8125rem;  /* 13px */
  --fs-base: 0.9375rem;/* 15px */
  --fs-md: 1.0625rem;  /* 17px */
  --fs-lg: 1.375rem;   /* 22px */
  --fs-xl: 1.875rem;   /* 30px */
  --fs-2xl: 2.5rem;    /* 40px */
  /* Cinzel sets wide; a 44px floor split the hero title on a 375px phone. */
  --fs-3xl: clamp(2.35rem, 7vw, 5rem);

  --lh-tight: 1.12;
  --lh-snug: 1.35;
  --lh-body: 1.7;

  /* Tracked uppercase micro-labels — the "inscription" voice */
  --track-label: 0.18em;
  --track-wide: 0.32em;

  /* ---- Space --------------------------------------------- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* ---- Radii --------------------------------------------- */
  /* Cut stone, not blown glass. Tighter than you would reach for. */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 14px;
  --r-full: 999px;

  /* ---- Elevation ----------------------------------------- */
  --shadow-well: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 1px 0 rgba(0, 0, 0, 0.55);
  --shadow-card: 0 18px 50px -24px rgba(0, 0, 0, 0.92);
  --shadow-lift: 0 28px 70px -30px rgba(0, 0, 0, 0.96);
  --glow-ember: 0 0 0 1px var(--line-ember), 0 0 28px -6px var(--ember-glow);
  --glow-moss: 0 0 0 1px rgba(134, 192, 81, 0.4),
    0 0 28px -6px var(--moss-glow);

  /* ---- Motion -------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-med: 280ms;
  --t-slow: 620ms;
  /* Flicker: firelight never holds still and never repeats evenly. */
  --t-flicker: 4.7s;

  /* ---- Layout -------------------------------------------- */
  --w-page: 1200px;
  --w-prose: 46rem;
  --nav-h: 64px;
}

/* Rarity / tier scale — reused by docs tables and the game HUD */
:root {
  --tier-common: #A9998A;
  --tier-uncommon: #86C051;
  --tier-rare: #6BA8E8;
  --tier-epic: #9A6BD1;
  --tier-relic: #F2C14E;
  --tier-gloam: #FF5470;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 1ms;
    --t-med: 1ms;
    --t-slow: 1ms;
    --t-flicker: 1ms;
  }
}
