/* ==========================================================================
   ESPOOO — base
   ========================================================================== */

/* --- Self-hosted fonts --------------------------------------------------- */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-latin-400-normal.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: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-latin-500-normal.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: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-latin-600-normal.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: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-latin-700-normal.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: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-en);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: var(--lh-ar); }
img, svg, picture, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: var(--fw-semibold); overflow-wrap: break-word; text-wrap: balance; }
p { text-wrap: pretty; }

/* Latin brand/product names inside Arabic copy keep Inter and stay LTR. */
.latin, .brand { font-family: var(--font-en); unicode-bidi: isolate; direction: ltr; display: inline-block; }
bdi { unicode-bidi: isolate; }

/* --- Focus ----------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
.on-dark :focus-visible, .section--dark :focus-visible { outline-color: var(--white); }

/* --- Accessibility helpers ------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100%; z-index: 1000; padding: .75rem 1rem; background: var(--navy-900); color: var(--white); border-radius: var(--r-sm); font-weight: var(--fw-medium); }
.skip-link:focus { top: 1rem; }

/* --- Layout primitives ----------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }

.section { position: relative; padding-block: var(--section-y); }
.section--alt  { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: var(--fg-on-dark); }
.section--dark .section-head p,
.section--dark .muted { color: var(--fg-on-dark-muted); }
.section + .section:not(.section--alt):not(.section--dark) { border-top: 1px solid var(--border); }

/* --- Typography ------------------------------------------------------------ */
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -.02em; font-weight: var(--fw-semibold); }
html[lang="ar"] .display { letter-spacing: 0; line-height: 1.24; font-weight: var(--fw-bold); font-size: clamp(2.25rem, 1.4rem + 2.9vw, 3.75rem); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); letter-spacing: -.015em; }
html[lang="ar"] .h2 { letter-spacing: 0; line-height: 1.4; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; }
html[lang="ar"] .h3 { line-height: 1.5; }
.lead { font-size: var(--fs-lead); color: var(--fg-muted); line-height: 1.65; max-width: 40em; }
html[lang="ar"] .lead { line-height: 1.85; }
.muted { color: var(--fg-muted); }
.small { font-size: var(--fs-small); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head .h2 { margin-bottom: var(--sp-4); }
.section-head p { color: var(--fg-muted); font-size: var(--fs-lead); }

/* Accent rule: short purple bar that anchors a section heading (brand signature). */
.rule { display: block; width: 3rem; height: 3px; border-radius: 2px; background: var(--grad-accent); margin-bottom: var(--sp-6); }
.section--dark .rule { background: var(--purple-500); }

/* --- Icons ------------------------------------------------------------------ */
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
html[dir="rtl"] .icon--arrow,
html[dir="rtl"] .icon--chevron { transform: scaleX(-1); }

/* --- Logo ------------------------------------------------------------------- */
.logo { height: 2rem; width: auto; image-rendering: -webkit-optimize-contrast; }
.logo--missing {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2rem; aspect-ratio: 3.9 / 1;
  border: 1px dashed rgba(124, 58, 237, .6); border-radius: 4px;
  color: var(--purple-600); font: 600 .7rem/1 var(--font-en); letter-spacing: .04em; text-transform: none;
}
.logo--empty { display: inline-block; height: 2rem; aspect-ratio: 3.9 / 1; }

/* --- Reduced motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
