/* =========================================================
   JUSPIRE — UTILITIES

   Defines narrowly scoped accessibility and color-scheme
   utilities that may be applied across the Juspire site.
   ========================================================= */

@layer ja-utilities {
  /* =======================================================
     VISUALLY HIDDEN

     Keeps meaningful content available to assistive
     technology while removing it from visual presentation.
     ======================================================= */

  .ja-u-visually-hidden {
    position: absolute;

    inline-size: 1px;
    block-size: 1px;

    overflow: hidden;

    clip-path: inset(50%);

    white-space: nowrap;
  }

  /* =======================================================
     FORCED COLOR SCHEMES

     Allows a subtree to resolve light-dark() semantic tokens
     independently from the page-level color scheme and paints
     the corresponding base surface and foreground.
     ======================================================= */

  .ja-u-scheme-dark {
    color-scheme: dark;

    background: var(--ja-surface-base);
    color: var(--ja-ink);
  }

  .ja-u-scheme-light {
    color-scheme: light;

    background: var(--ja-surface-base);
    color: var(--ja-ink);
  }
}
