/* ============================================================
   Baridy Design System — base.css
   Minimal reset + document defaults bound to semantic tokens.
   Logical properties only (no physical left/right). RTL rules per 07 §3.
   No hex values here — colors come from tokens.css.
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg-canvas);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: var(--leading-body);
    text-align: start;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Page background wash (mockup style.css lines 170-198; Phase A-2 Task 1) ----
   Two large blurred radial-gradient blobs, fixed to the viewport corners, that drift slowly behind the
   shell. z-index -1 keeps them behind body's own painted background per stacking-context paint order
   (element background paints first, then negative-z-index descendants), so they never intercept clicks
   (pointer-events: none) or push layout (position: fixed, no box-model footprint). */
body::before,
body::after {
    content: "";
    position: fixed;
    inline-size: 60vw;
    block-size: 60vw;
    filter: blur(100px);
    opacity: .45;
    z-index: -1;
    pointer-events: none;
}

body::before {
    inset-block-start: -18vw;
    inset-inline-start: -18vw;
    background: var(--gradient-wash-a);
    animation: blob-float-a 18s ease-in-out infinite alternate;
}

body::after {
    inset-block-end: -18vw;
    inset-inline-end: -18vw;
    background: var(--gradient-wash-b);
    animation: blob-float-b 22s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

@keyframes blob-float-a {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(3vw, -2vw) scale(1.03); }
    66%  { transform: translate(-1vw, 2vw) scale(.98); }
    100% { transform: translate(1vw, -1vw) scale(1.02); }
}

@keyframes blob-float-b {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(-2vw, 3vw) scale(.98); }
    66%  { transform: translate(2vw, -1vw) scale(1.03); }
    100% { transform: translate(-1vw, 2vw) scale(.99); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-display);
}

a {
    color: var(--color-action-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
}

/* ---- base icon sizing (fix-wave R1; precedent: src/KwtPost.Admin/wwwroot/css/site.css:22) ----
   Browsers give an unsized <svg> the UA-default replaced-element box (300x150px) -- any .icon usage
   with no MORE-SPECIFIC scoped override (the many rp- and ref- prefixed rules in components.css)
   falls through to this base. Portal had no equivalent rule at all (Admin's site.css carries it,
   Portal's does not), so a bare <svg class="icon"> rendered at the 300x150px fallback box
   (fidelity-inventory.md Finding #0). Admin's own site.css rule is left untouched (harmless
   duplicate) -- this is the shared default both apps should get from KwtPost.DesignSystem. */
.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

/* ---- RTL / bilingual optical balance (07 §3, verbatim intent) ---- */
/* ---- The 16->17px Arabic root inflation + font-size-adjust moved to KwtPost.Portal/wwwroot/css/site.css 2026-07-18: the admin mockup v2 paints a flat 16px root in BOTH languages (measured live, scalecheck 2026-07-18) so the admin must not inflate; the portal keeps its shipped behavior pending its own mockup ruling. ---- */
html[dir="rtl"] :not([dir="ltr"]){ letter-spacing:0 !important; }  /* never track Arabic — but keep intentional tracking on dir=ltr Latin runs (e.g. .tracking-code) */

/* The portal-only ≤800px Arabic-root reversal that briefly lived here (fix-wave 3, ledger top-10 #1)
   moved to KwtPost.Portal/wwwroot/css/site.css at the B1 merge (2026-07-19), next to the 106.25%
   inflation it reverses — exactly as that block's own MERGE NOTE prescribed. Admin is a flat 16px
   root at every width and needs neither rule. */
