html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

html,
body {
    min-height: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    overflow-x: clip;
    color: var(--app-text);
    background:
        radial-gradient(circle at top right, rgba(29, 161, 242, 0.08), transparent 20%),
        radial-gradient(circle at bottom left, rgba(11, 60, 93, 0.08), transparent 22%),
        var(--app-bg);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.6;
    font-weight: var(--font-weight-regular);
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition:
        background-color var(--motion-base) var(--ease-standard),
        color var(--motion-base) var(--ease-standard);
}

html[dir="ltr"] body {
    text-align: left;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
button,
input,
select,
textarea,
nav,
a,
span,
div,
label,
table,
th,
td {
    font: inherit;
    font-family: var(--font-family-base);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: var(--font-family-heading);
    color: var(--color-text-primary);
    text-wrap: balance;
}

h1,
h2,
h3 {
    line-height: 1.3;
}

h1 {
    font-weight: var(--font-weight-extrabold);
    line-height: 1.3;
}

h2,
h3 {
    font-weight: var(--font-weight-bold);
}

h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
}

p {
    margin: 0;
    line-height: 1.8;
    font-weight: var(--font-weight-regular);
}

h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p,
h6 + p {
    margin-top: 12px;
}

p + p {
    margin-top: 10px;
}

img,
svg,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    color: inherit;
    font-family: var(--font-family-base);
}

button {
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.65;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    a,
    button,
    label,
    span,
    div {
        overflow-wrap: anywhere;
    }
}

@supports (min-height: 100svh) {
    body,
    .fh-app,
    .app-shell,
    .page,
    .auth-page,
    .landing-page,
    .landing-v2-page,
    .admin-shell {
        min-height: 100svh;
    }
}
