/* fichrs: snow-trail design tokens (single source of truth).
 *
 * A shared file leaves a trail: the watermark, the expiry, the short link, the
 * provenance stamp. fichrs ("fichiers" + "traces") dresses that idea in snow and
 * glacier light. Two stages share one palette:
 *
 *   - LIGHT CHROME  (default :root)        : management surfaces, bright and calm.
 *   - DARK STAGE    ([data-st-stage=night]) : the view-only viewer; the document
 *                                             is the light source, like a gallery wall.
 *
 * Every fill/text pair below is WCAG-verified (see contrast notes inline).
 * Colors are OKLCH so the ramps stay perceptually even when you retune them.
 */

:root {
  /* ---- brand primitives (stage-independent) ---------------------------- */
  --st-glacier:      oklch(0.74 0.11 245);   /* accent: links-on-dark, borders, hover, chips */
  --st-glacier-deep: oklch(0.52 0.13 248);   /* fill on light chrome, white text = 5.5:1     */
  --st-amber:        oklch(0.78 0.105 62);   /* expiry / caution, pair with --st-graphite ink */
  --st-pine:         oklch(0.70 0.13 155);   /* success accent (chips, text on dark)           */
  --st-pine-deep:    oklch(0.52 0.12 155);   /* success fill on light, white text = 5.2:1     */
  --st-graphite:     oklch(0.27 0.022 252);  /* near-black ink: text on glacier/amber fills    */
  --st-paper:        oklch(1 0 0);           /* white: text on the -deep fills                 */

  /* ---- LIGHT CHROME roles (default) ----------------------------------- */
  --st-bg:        oklch(0.985 0.004 240);    /* snow              */
  --st-surface:   oklch(0.965 0.006 240);    /* raised snow       */
  --st-elevated:  oklch(1 0 0);              /* cards / popovers  */
  --st-fg:        oklch(0.27 0.022 252);     /* body ink   14.4:1 on bg */
  --st-fg-muted:  oklch(0.50 0.02 248);      /* muted      5.7:1  on bg */
  --st-line:      oklch(0.90 0.008 240);     /* hairlines         */
  --st-link:      var(--st-glacier-deep);    /* 5.3:1 on bg       */

  /* ---- type ----------------------------------------------------------- */
  --st-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --st-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  /* ---- radii / shadow / motion ---------------------------------------- */
  --st-r-sm: 6px;
  --st-r:    10px;
  --st-r-lg: 14px;
  --st-r-pill: 999px;

  --st-shadow-1: 0 1px 2px rgba(15, 23, 32, 0.06), 0 2px 8px rgba(15, 23, 32, 0.06);
  --st-shadow-2: 0 8px 28px rgba(15, 23, 32, 0.12);

  /* ease-out-quint: confident arrival, no bounce */
  --st-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --st-fast: 140ms;
  --st-slow: 220ms;
}

/* ---- DARK STAGE overrides (the viewer) -------------------------------- */
[data-st-stage="night"] {
  --st-bg:       oklch(0.175 0.012 252);     /* near-black slate  */
  --st-surface:  oklch(0.215 0.013 252);
  --st-elevated: oklch(0.215 0.013 252);
  --st-fg:       oklch(0.885 0.008 250);     /* 13.4:1 on bg      */
  --st-fg-muted: oklch(0.66 0.012 250);      /* 6.1:1  on bg      */
  --st-line:     oklch(0.30 0.015 250);
  --st-link:     var(--st-glacier);          /* 8.3:1 on bg       */

  --st-shadow-1: 0 2px 10px rgba(0, 0, 0, 0.45);
  --st-shadow-2: 0 12px 40px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --st-fast: 0ms; --st-slow: 0ms; }
}
