/*
 * Application stylesheet (Propshaft, served via stylesheet_link_tag :app).
 *
 * Self-hosted Arabic webfont (FOUND-04). Propshaft 1.3.2 has NO ERB compiler —
 * its CssAssetUrls compiler instead rewrites bare `url("...")` references to the
 * fingerprinted asset URL at build time. A LEADING-SLASH reference
 * (`url("/assets/IBMPlexSansArabic-Regular-cca48952.woff2")`) resolves from the asset-root
 * (logical) path, which is where the font lives once vendor/fonts is on the
 * Propshaft load path (see config/initializers/assets.rb). This is the
 * Propshaft-native equivalent of the spec's asset_path() ERB approach (which
 * would not be processed, since Propshaft does not run ERB over .css).
 *
 * IBM Plex Sans Arabic is OFL-licensed (self-hosted woff2 in vendor/fonts). The
 * @theme --font-arabic token (app/assets/tailwind/application.css) lists it first
 * with a "Noto Sans Arabic", system-ui fallback chain, so text renders correctly
 * even before/without the webfont.
 */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/IBMPlexSansArabic-Regular-cca48952.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*
 * SemiBold 600 face (Phase 3, UI-SPEC §Typography contract requirement). The
 * design system uses exactly two weights — 400 (body/labels/inputs) and 600
 * (headings, table headers, primary-button text, active nav, emphasis). Without
 * a real 600 face the browser SYNTHESIZES bold, which renders badly in Arabic.
 * Self-hosted OFL woff2 from the official IBM Plex Sans Arabic distribution,
 * mirroring the weight-400 block above (same family name + same Propshaft
 * leading-slash url() form so the CssAssetUrls compiler fingerprints it).
 */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/IBMPlexSansArabic-SemiBold-de050cf3.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/*
 * IBM Plex Mono 400 (Phase 8.2 redesign). Resolves the --font-mono token
 * (app/assets/tailwind/application.css @theme inline) for the 3 existing
 * `font-mono` references — OTP input, the QR otpauth panel secret, and backup
 * recovery codes — so codes/IDs render in a true monospaced face instead of
 * silently falling back to ui-monospace. Self-hosted OFL woff2 from the
 * official IBM Plex distribution (github.com/IBM/plex), mirroring the Arabic
 * 400 block above (same Propshaft leading-slash url() so CssAssetUrls
 * fingerprints it). Weight 400 only — mono emphasis is rare; 500/700 are NOT
 * vendored. NO CDN @import (self-host discipline; RESEARCH Pitfall 7).
 */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/IBMPlexMono-Regular-537ab494.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*
 * Reduced-motion guard (Phase 8.2 a11y gate, NEW). The Precision finish
 * introduces transitions/animations across the re-skinned chrome; users who
 * set prefers-reduced-motion: reduce must not be subjected to them (WCAG 2.3.3
 * / vestibular-safety). Neutralize non-essential motion globally rather than
 * per-element so no later re-skin wave can regress the contract.
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
