/* bundle of: /assets/css/preloader.css /assets/css/ui.css /assets/css/fonts.css?v=20261027 /assets/css/site-polish.css?v=20261123 */
/* ---- /assets/css/preloader.css ---- */
/* preloader.css — the home page's video-logo preloader for every inner page.
   Same look and timing as index.html (home-hero-anim.css + its inline failsafe). */
.preloader {
    position: fixed; inset: 0; z-index: 9999999;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-bg) none;
    animation: site-preloader-out 0.4s ease 6s forwards;   /* closes even if no script runs */
}
.preloader-logo:not([hidden]) {
    display: block; width: 250px; max-width: calc(100% - 32px); height: 100%; object-fit: contain;
}
.preloader.is-done {
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
@keyframes site-preloader-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .preloader { display: none; } }

/* ---- /assets/css/ui.css ---- */
/* ==========================================================================
   ui.css — shared components and accessibility layer. Loaded LAST on every page.
   Uses tokens.css only. Sections: 1 Buttons · 2 Inputs · 3 Focus · 4 Hidden controls · 5 Reduced motion
   ========================================================================== */

/* 1. Buttons ---------------------------------------------------------------
   One button. Base classes: .theme-btn (template pages), .btn (generated pages),
   .cta-button (header). Variants: default = primary, .btn--outline (alias .btn-line),
   .btn--ghost. Sizes: .btn--sm / .btn--md / .btn--lg.
   States: hover, :focus-visible, :disabled / [aria-disabled="true"] / .is-disabled,
   loading = .is-loading or inside a form[aria-busy="true"].                   */
html body .theme-btn, html body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
html body .theme-btn, html body .btn, html body .cta-button {
  border-radius: var(--radius-btn);
  font-family: var(--font-body); font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
/* primary */
html body .theme-btn:not(.btn--outline):not(.btn--ghost),
html body .cta-button,
html body .btn.btn-lime {
  background-color: var(--color-brand); color: var(--color-on-brand) !important; opacity: 1;
}
html body .theme-btn:not(.btn--outline):not(.btn--ghost):hover,
html body .cta-button:hover,
html body .btn.btn-lime:hover {
  background-color: var(--color-brand-hover); opacity: 1;
}
/* outline */
html body .theme-btn.btn--outline, html body .btn.btn--outline, html body .btn.btn-line {
  background-color: transparent; color: var(--color-text) !important; border: 1px solid var(--color-border-strong);
}
html body .theme-btn.btn--outline:hover, html body .btn.btn--outline:hover, html body .btn.btn-line:hover {
  border-color: var(--color-brand); color: var(--color-brand) !important;
}
/* ghost */
html body .theme-btn.btn--ghost, html body .btn.btn--ghost {
  background-color: transparent; color: var(--color-text) !important; border: 1px solid transparent;
}
html body .theme-btn.btn--ghost:hover, html body .btn.btn--ghost:hover {
  background-color: rgba(255, 255, 255, .06); color: var(--color-brand) !important;
}
/* sizes (opt-in, so existing layouts keep their padding) */
html body .btn--sm { min-height: 36px; padding: 8px 16px;  font-size: var(--fs-14); }
html body .btn--md { min-height: 48px; padding: 12px 28px; font-size: var(--fs-16); }
html body .btn--lg { min-height: 56px; padding: 16px 36px; font-size: var(--fs-18); }
/* disabled */
html body .theme-btn:disabled, html body .btn:disabled, html body .cta-button:disabled,
html body [aria-disabled="true"].theme-btn, html body [aria-disabled="true"].btn,
html body .theme-btn.is-disabled, html body .btn.is-disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}
/* loading */
html body .is-loading.theme-btn, html body .is-loading.btn,
html body form[aria-busy="true"] button[type="submit"] { position: relative; cursor: progress; }
html body .is-loading.theme-btn::after, html body .is-loading.btn::after,
html body form[aria-busy="true"] button[type="submit"]::after {
  content: ""; width: 14px; height: 14px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ui-spin .7s linear infinite;
}
/* Sending: the submit button is disabled but should read as busy, not unavailable */
html body form[aria-busy="true"] button[type="submit"]:disabled { opacity: 1; cursor: progress; pointer-events: none; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* 2. Inputs ----------------------------------------------------------------
   .form-control (template forms, used by form-validator.js) and .ds-input/.ds-select
   share one look.                                                              */
html body .form-control, html body .ds-input, html body .ds-select {
  background-color: transparent; color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-input);
  font-family: var(--font-body);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
html body .ds-input, html body .ds-select { background-color: var(--color-surface); }
html body .form-control::placeholder, html body .ds-input::placeholder { color: rgba(255, 255, 255, .3); }
html body .form-control:focus, html body .ds-input:focus, html body .ds-select:focus {
  outline: 0; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb), .15);
}
html body .form-control[aria-invalid="true"], html body .ds-input[aria-invalid="true"] { border-color: var(--color-error); }
html body .form-control:disabled, html body .ds-input:disabled { opacity: .5; cursor: not-allowed; }

/* 3. Keyboard focus ---------------------------------------------------------
   Visible ring for keyboard users only (mouse clicks don't show it).            */
:where(a, button, [role="button"], input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring) !important; outline-offset: var(--focus-offset);
  border-radius: 4px;
}
html body .theme-btn:focus-visible, html body .btn:focus-visible, html body .cta-button:focus-visible {
  outline: var(--focus-ring) !important; outline-offset: var(--focus-offset); border-radius: var(--radius-btn);
}
/* inputs already show a green border + glow on focus */
:where(input, select, textarea).form-control:focus-visible,
:where(input, select, textarea).ds-input:focus-visible { outline-offset: 1px; }

/* 4. Checkbox / radio / toggle ----------------------------------------------
   Keep the real input reachable by keyboard and screen readers (was display:none). */
.ds-checkbox, .ds-radio, .ds-toggle {
  display: block !important; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.ds-checkbox:focus-visible + .ds-checkbox-box,
.ds-radio:focus-visible + .ds-radio-circle,
.ds-toggle:focus-visible + .ds-toggle-slider { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* 5. Reduced motion ---------------------------------------------------------
   Honour the visitor's OS setting site-wide. script.js also swaps the hero
   video for its final-frame still and skips the preloader video.              */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .preloader { display: none !important; }
  .hf-hero-video { display: none !important; }
  .hf-hero-still { display: block !important; width: 100%; height: auto; }
  .bg-lines span { height: 100% !important; }
}

/* Small phones (EN + AR): keep logo, language switch and icons from touching — 2026-10-13 */
.site-header .header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: 12px; }
@media (max-width: 479.98px) {
  .site-header .header-container { padding-left: 16px; padding-right: 16px; }
  .site-header .header-logo img { height: 20px; }
  .site-header .lang-switch { min-height: 36px; padding: 0 6px; gap: 4px; font-size: 13px; margin-inline-end: 0; }
  .site-header .search-link { width: 40px; height: 40px; margin-inline-end: 0; }
}

/* Language switch (EN ⇄ AR) in the header — added Oct 2026 */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; margin-inline-end: 2px; border-radius: 999px; font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1; color: var(--color-white); text-decoration: none; opacity: .85; transition: opacity .2s, color .2s; }
.lang-switch svg { flex: none; width: 18px; height: 18px; }
.lang-switch:hover, .lang-switch:focus-visible { opacity: 1; color: var(--color-brand); }
.lang-switch[lang="ar"] { font-family: var(--font-arabic); }

/* Header search icon + /search page — added Oct 2026 */
.search-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-end: 6px; color: inherit; opacity: .85; border-radius: 50%; }
.search-link:hover, .search-link:focus-visible { opacity: 1; }
.site-search { display: flex; gap: 12px; margin-top: 32px; max-width: 760px; }
.site-search input { flex: 1; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: 17px; }
.site-search input:focus { outline: 2px solid var(--lime, #82ff00); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-count { opacity: .7; margin: 0 0 16px; }
.search-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.search-results a { display: block; padding: 18px 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; color: inherit; text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { border-color: var(--lime, #82ff00); }
.search-results h3 { margin: 0 0 6px; font-size: 19px; }
.search-results p { margin: 0 0 6px; opacity: .8; font-size: 15px; }
.search-results .url { font-size: 13px; color: var(--lime, #82ff00); }
@media (max-width: 600px) { .site-search { flex-direction: column; } }

/* Outlined display text (EN + AR): overlapping glyph contours draw seams through letters (A crossbars, e, g, joined Arabic).
   Fill with the band colour and paint the stroke underneath; the visible outer 1px matches the old 1px stroke. — 2026-10-18 */
body.home-figma .hf-big-ticker .marquee-item span { color: rgb(15, 14, 14); -webkit-text-stroke-width: 2px; paint-order: stroke fill; }
body.home-figma .hf-awards .award-box .tag { color: rgb(16, 19, 22); -webkit-text-stroke-width: 2px; paint-order: stroke fill; }
.awards-list-area .award-box .tag { color: rgb(22, 27, 34); -webkit-text-stroke-width: 2px; paint-order: stroke fill; }
body.home-figma .hf-awards .award-box:hover .tag, .awards-list-area .award-box:hover .tag { color: var(--color-white); }

/* Footer "Connect:" row — the icon row's 15px bottom margin pushed it off-centre from the label */
.main-footer .social-flow .social-style-one { margin-bottom: 0; }

/* ---- /assets/css/fonts.css?v=20261027 ---- */
/* ==========================================================================
   mouazalsabbagh.com — Fonts
   Self-hosted from /assets/fonts/site/ (no third-party font requests).
   Loaded on every page (EN + AR). Licences: /assets/fonts/site/*-OFL.txt

   English  — headings: Outfit      body/UI: DM Sans
   Arabic   — Sora for Latin text, numbers and brand names,
              IBM Plex Sans Arabic for Arabic script (Sora has no Arabic
              glyphs, so the browser falls through to Plex per character).
   ========================================================================== */

/* ---------- Outfit (variable, 100–900) ---------- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/site/outfit.woff2') format('woff2');
}

/* ---------- DM Sans (variable, 100–1000, optical size 9–40) ---------- */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/assets/fonts/site/dm-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/assets/fonts/site/dm-sans-italic.woff2') format('woff2');
}

/* ---------- Sora (variable, 100–800) ---------- */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/assets/fonts/site/sora.woff2') format('woff2');
}

/* ---------- IBM Plex Sans Arabic (static, 100–700) ---------- */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 100; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-thin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 200; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-extralight.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 300; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-light.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-semibold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/site/ibm-plex-sans-arabic-bold.woff2') format('woff2'); }

/* ---------- Font tokens ----------
   Every stylesheet on the site reads these variables, so changing a font
   here changes it everywhere. Aliases keep older variable names working. */
:root {
  --font-en-heading: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-en-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar:         'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  --font-display: var(--font-en-heading);   /* headings, titles, big numbers */
  --font-body:    var(--font-en-body);      /* text, nav, buttons, forms */
  --font-arabic:  var(--font-ar);           /* Arabic snippets on EN pages */

  /* aliases used by older stylesheets */
  --font-heading: var(--font-display);
  --f-display:    var(--font-display);
  --f-body:       var(--font-body);
  --f-arabic:     var(--font-arabic);
}

/* Arabic pages: one family stack for everything */
html[lang="ar"],
html[dir="rtl"] {
  --font-display: var(--font-ar);
  --font-body:    var(--font-ar);
}

/* ---------- Base usage ---------- */
body {
  font-family: var(--font-body);
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.heading {
  font-family: var(--font-display);
}
button, input, select, textarea, .form-control, .nice-select, .theme-btn {
  font-family: var(--font-body);
}
/* Arabic text inside English pages (language switch, bilingual titles) */
[lang="ar"]:not(i):not([class*="fa-"]):not([class*="flaticon"]) {
  font-family: var(--font-ar);
}

/* ---- /assets/css/site-polish.css?v=20261123 ---- */
/* Keep the existing typography tokens and sizes; resolve their fonts locally. */
.wow { visibility: visible !important; animation-name: none !important; transition: opacity 240ms ease-out, transform 240ms ease-out; }
.site-reveal-pending { opacity: 0; transform: translate3d(0, 12px, 0); }
.marquee-inner.site-motion-paused { animation-play-state: paused !important; }
/* The old control depended on .main-header, absent from the current header. */
.scroll-top { display: none !important; }
.site-back-to-top {
    position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
    width: 48px; height: 48px; display: grid; place-items: center; padding: 0;
    border: 1px solid #82ff00; border-radius: 50%; background: #82ff00; color: #0a0f02;
    z-index: 1100; cursor: pointer; box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
    transition: background-color 160ms ease, transform 160ms ease;
}
.site-back-to-top[hidden] { display: none; }
.site-back-to-top:hover { background: #baff42; transform: translateY(-2px); }
.site-back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
/* Avoid a viewport-sized fractal filter layer during scroll. */
body::after { display: none !important; }
.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgb(10 12 14 / 97%); }
.preloader { animation-duration: 200ms; }
@media (max-width: 767.98px) {
    .wow { transition: none; }
    .bg-lines span { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .wow, .site-reveal-pending { opacity: 1; transform: none; transition: none; }
    .marquee-inner { animation-play-state: paused !important; }
    .site-back-to-top { transition: none; }
    .bg-lines span { animation: none !important; }
}

/* Strategic pillar numbers (01–05) — menus, pillar strip, filters, sitemap. Added Oct 2026. */
.pillar-no {
  display: inline-block;
  min-width: 1.6em;
  margin-inline-end: .55em;
  color: var(--color-brand, #82ff00);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .82em;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  opacity: .9;
}
.pillar-nav a > .pillar-no,
.nav-sub a > .pillar-no,
.footer-sitemap .pillar-no { color: var(--color-brand, #82ff00); }
.pillar-nav a > .pillar-no { display: block; margin: 0 0 .35em; font-size: .9rem; font-weight: 500; }
.nav-sub a > .pillar-no { vertical-align: baseline; }
html[dir="rtl"] .pillar-no { font-family: var(--font-display); unicode-bidi: isolate; }
/* Filter chips: on hover, focus or when selected the number takes the chip text colour (green on green was invisible). 20 Nov 2026. */
.project-filter li:hover > .pillar-no,
.project-filter li:focus-visible > .pillar-no,
.project-filter li.current > .pillar-no { color: inherit; opacity: 1; }
.chip:hover > .pillar-no,
.chip:focus-visible > .pillar-no,
.chip[aria-pressed="true"] > .pillar-no,
.project-filter li[aria-pressed="true"] > .pillar-no { color: inherit; opacity: 1; }

/* Images with width/height attributes keep their proportions when CSS sets only the width (no layout shift while loading). Zero specificity, so any explicit height still wins. */
:where(img[width][height]) { height: auto; }

/* P8 focus (20 Nov 2026): every keyboard-focusable element shows a visible ring (WCAG 2.4.7). Overrides the template's a{outline:0}. */
html body :is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible { outline: 2px solid var(--color-brand, #82ff00) !important; outline-offset: 3px; }
/* Skip link (WCAG 2.4.1): hidden until focused. */
.skip-link { position: absolute; inset-inline-start: 12px; top: -100px; z-index: 2000; padding: 10px 16px; border-radius: 8px; background: var(--color-brand, #82ff00); color: #0a0f02; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* P8 transition (20 Nov 2026): the template animates every property of links and buttons over .5s ("a{transition:.5s}"),
   so the focus ring and skip link faded in slowly. Animate colours and transforms only; focus styles appear at once. */
html body :is(a, button) { transition-property: color, background-color, border-color, opacity, transform, box-shadow; }
html body :is(a, button):focus-visible, .skip-link { transition: none; }

/* Lighthouse, 23 Nov 2026: readable sidebar links and quote names, icons keep their shape, text for screen readers */
.main-sidebar .widget-category ul li,.main-sidebar .widget-category ul li a:not(:hover){color:rgba(255,255,255,.62)}
blockquote .blockquote-footer{color:rgba(255,255,255,.62)}
.icon-sm,.icon-lg{object-fit:contain}
.vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

