/*
 * Site-wide design layer, loaded after the imported theme CSS on every page.
 *
 * Fonts: the theme names its fonts NotoSansHebrew (Hebrew pages) and Outfit and
 * Inter (English pages) in hundreds of rules. Rather than override every rule,
 * the same names are pointed at new files: Rubik for Hebrew and Plus Jakarta
 * Sans for English, both self-hosted from public/fonts/. A face declared later
 * wins over the theme's own for the same name and weight.
 *
 * Colors are rewritten in the theme files themselves by scripts/apply-design.mjs.
 */
@font-face {
  font-family: NotoSansHebrew;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: NotoSansHebrew;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: NotoSansHebrew;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Opensanshebrew";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Opensanshebrew";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Opensanshebrew";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --porat-ink: #0A0F1E;
  --porat-surface: #121B30;
  --porat-raised: #18223B;
  --porat-aqua: #4FE6D8;
  --porat-aqua-deep: #2BD4C6;
  --porat-periwinkle: #7B86FF;
  --porat-text: #EEF2F8;
  --porat-muted: #9AA6BA;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--porat-ink);
}
::selection {
  background: var(--porat-aqua);
  color: var(--porat-ink);
}

/* English headings: tighter tracking suits Plus Jakarta Sans at display sizes. Hebrew keeps its default.
   Important because some theme blocks letter-space their headings for the old font. */
html[lang^="en"] body :is(h1, h2, h3, .uagb-heading-text, .uagb-ifb-title) {
  letter-spacing: -0.02em !important;
}
/* Some theme headings are set as tight as 0.88; the new fonts' descenders need more room when they wrap. */
body :is(h1, h2) {
  line-height: 1.15 !important;
}
/* The theme allows breaking anywhere, which splits words mid-word ("Admini|strator"). */
body * {
  line-break: auto !important;
}
:is(h1, h2) {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* Visible keyboard focus everywhere. */
:focus-visible {
  outline: 2px solid var(--porat-aqua);
  outline-offset: 3px;
}

/* Rubik is heavier than the Noto it replaces: running text goes back to regular weight. */
html[lang^="he"] body :is(p, li):not(.uagb-ifb-title):not(.uagb-heading-text) {
  font-weight: 400;
}
/* The theme letter-spaced Hebrew headings for Noto; Rubik reads better without it. */
html[lang^="he"] body :is(h1, h2, h3) {
  letter-spacing: normal !important;
}

/* A few imported sections are a little wider than a phone screen; never scroll the page sideways. */
html,
body {
  overflow-x: clip;
}
.tf-footer-container a {
  word-break: normal !important;
  overflow-wrap: break-word;
}
