/* The platform's tokens over Mudda's design system (the mudda-theme gem, from mudda-design; see
 * design.md). The gem's tokens, scales, faces and dark variant load first (layouts/application);
 * the names application.css uses map onto them here, so they flip with the gem's dark.css too.
 * What is only the platform's: the dirham sign and the page's own sizes.
 */

/* The UAE dirham sign (U+20C3) for prices, one font per stack (see app/assets/fonts/Dirham-LICENSE.txt).
 * System fonts don't draw it yet, and unicode-range keeps these to that one character. The glyphs
 * sit on the baseline with a gap after them, and size-adjust sets them to the height of their
 * stack's digits, as the Central Bank's guidelines ask: the height of a flat-topped digit ("1")
 * over the sign's height, in font units.
 *   Sans   IBM Plex Sans   698 / 1000 = 70%
 *   Serif  Amiri           629 / 945  = 67%
 *   Mono   JetBrains Mono  730 / 977  = 75%
 * All three faces come from mudda-theme: recompute these if it changes them.
 */
@font-face {
  font-family: "Dirham Sans";
  src: url("/assets/dirham-sans-587a41e8.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+20C3;
  size-adjust: 70%;
}

@font-face {
  font-family: "Dirham Serif";
  src: url("/assets/dirham-serif-1fbac305.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+20C3;
  size-adjust: 67%;
}

@font-face {
  font-family: "Dirham Mono";
  src: url("/assets/dirham-mono-80ce5366.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+20C3;
  size-adjust: 75%;
}

:root {
  /* Buttons and links are ink, as daisyUI's primary is in mudda; vermilion is the one accent. */
  --color-paper:      var(--paper);
  --color-paper-2:    var(--paper-200);
  --color-paper-3:    var(--paper-300);
  --color-rule:       var(--hairline);
  --color-muted:      var(--ink-muted);
  --color-ink:        var(--ink);
  --color-accent:     var(--ink);
  --color-accent-2:   var(--ink-muted);
  --color-accent-ink: var(--paper);
  --color-focus:      var(--vermilion);
  --color-warn:       var(--vermilion);

  --font-display: "Dirham Serif", var(--face-display);
  --font-body:    "Dirham Sans", var(--face-body);
  --font-mono:    "Dirham Mono", var(--face-mono);

  --page-max:    72rem;
  --page-gutter: clamp(1rem, 4vw, 2.5rem);
  --nav-h:       3.75rem;
  --nav-space:   calc(var(--nav-h) + var(--space-xs));
  --measure:     36rem;

  /* Near-square and flat: surfaces are told apart by hairlines, never shadows. */
  --radius-card:  var(--corner);
  --radius-input: var(--corner);
  --radius-bar:   var(--corner);
  --radius-pill:  999px;

  --shadow-float: none;
}
