/* ============================================================
   Maazaia — design system
   Tokens first, then primitives, then components.
   Dark sections re-declare their own text colours, so light text
   can never land on a light background in either RTL direction.
   ============================================================ */

:root {
  --paper:      #fbfbfa;
  --surface:    #f4f5f4;
  --ink:        #10161a;
  --ink-soft:   #38444a;
  --muted:      #5d6a70;
  --line:       #dfe3e4;
  --line-soft:  #eceeee;
  --brand:      #17534c;
  --brand-deep: #0d2f2b;
  --brand-ink:  #081c1a;
  /* Accent — muted brass. --accent is the text-safe shade on light
     surfaces (>= 4.5:1 on --paper); --accent-lift is for dark only. */
  --accent:      #8a6320;
  --accent-lift: #c99240;
  /* On-dark pairs, all >= 4.5:1 against --brand-deep */
  --on-dark:      #f2f6f5;
  --on-dark-soft: #b9c8c6;
  --on-dark-line: rgba(255,255,255,.16);
  --sans:  "IBM Plex Sans Arabic", var(--font-fallback);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(16,22,26,.05), 0 1px 1px rgba(16,22,26,.04);
  --sh-md: 0 4px 16px rgba(16,22,26,.06), 0 1px 3px rgba(16,22,26,.05);
  --sh-lg: 0 18px 48px rgba(8,28,26,.10), 0 4px 12px rgba(8,28,26,.06);
  --ease: cubic-bezier(.22,.61,.36,1);
  --wrap: 1160px;
  /* Glassmorphism */
  --glass: rgba(255,255,255,0.72);
  --glass-blur: 18px;
  --glass-border: rgba(255,255,255,0.25);
  --glass-border-hover: rgba(255,255,255,0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: clamp(2.35rem, 1.35rem + 4.4vw, 4.6rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.85rem); letter-spacing: -.024em; }
h3 { font-size: clamp(1.06rem, 1rem + .35vw, 1.24rem); }
p { margin: 0 0 1.05em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--wrap), calc(100% - 2.75rem)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100; padding: .7rem 1.1rem; background: var(--accent); color: #fff; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip:focus { top: 1rem; }

/* Subtle page texture so large flat areas do not read as synthetic */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, color-mix(in oklab, var(--brand) 7%, transparent), transparent 62%),
    radial-gradient(820px 520px at 4% 4%, color-mix(in oklab, var(--accent) 5%, transparent), transparent 58%);
}
body > * { position: relative; z-index: 1; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 80%, transparent);
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
}
.site-head__in { min-height: 74px; display: flex; align-items: center; gap: 1.6rem; }
.site-head.is-stuck { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(16,22,26,.05); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--brand-deep); font-weight: 650; font-size: 1.12rem; letter-spacing: -.01em; text-decoration: none; flex: none; }
/* The header sits on --paper, which in dark mode is near-black. The brand
   mark text uses --brand-deep, which is *also* near-black there, so it has
   to be re-pointed at the ink token for the theme to work. */
:root[data-theme="dark"] .site-head .brand { color: var(--ink); }

/* On dark surfaces --brand-deep resolves to a near-black that is invisible
   against a dark page. Only text links need remapping; buttons keep their
   own colours, which are set explicitly. */
.band--ink .foot__list a, .dark .foot__list a, .site-foot .foot__list a,
.band--ink .brand, .dark .brand, .site-foot .brand { color: var(--on-dark); }
.brand__mark { width: 34px; height: 34px; }
.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 1.65rem; list-style: none; padding: 0; margin: 0; }
.nav__link { text-decoration: none; font-size: .93rem; color: var(--ink-soft); font-weight: 500; position: relative; padding-block: .35rem; transition: color .18s var(--ease); }
.nav__link::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: inline-start; transition: transform .24s var(--ease); }
.nav__link:hover { color: var(--brand); }
.nav__link:hover::after { transform: scaleX(1); }
.head-actions { display: flex; align-items: center; gap: .7rem; flex: none; }
.lang { font-size: .88rem; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.lang:hover { color: var(--brand); }
.burger { display: none; border: 0; background: none; padding: .5rem; color: inherit; cursor: pointer; border-radius: var(--r-sm); }

.btns { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .62rem 1.2rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--brand); color: #fff;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0) scale(.985); }
/* --brand doubles as a link colour on light surfaces, but as a button
   fill it needs the dedicated token so the white label stays legible. */
.btn { background: var(--brand-fill, var(--brand)); }
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: translateY(0); }
/* Darker brass so the white label clears 4.5:1 */
.btn--accent { background: #7d5a1c; color: #fff; }
.btn--accent:hover { background: #6b4c17; }
/* Ghost button on a dark surface — light label, light border.
   Without this the label inherits the dark ink colour and is unreadable. */
.btn--ondark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.38); color: #fff; }
.btn--ondark:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn--lg { padding: .85rem 1.5rem; font-size: 1rem; }
.i { width: 1.05em; height: 1.05em; flex: none; }
/* ---------- Glass Card ---------- */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}

/* ---------- sections ---------- */
main { position: relative; }
/* Sections sit above the ambient layer. */
main > section { position: relative; z-index: 1; }

.section { padding-block: clamp(3.75rem, 2.2rem + 5.6vw, 7rem); }
.band { background: var(--surface); }
/* Dark band re-declares its own palette so light text can never
   fall onto a light background. */
.band--ink, .dark {
  background: var(--brand-deep);
  color: var(--on-dark);
  --ink: var(--on-dark);
  --ink-soft: var(--on-dark-soft);
  --muted: var(--on-dark-soft);
  --line: var(--on-dark-line);
  --line-soft: var(--on-dark-line);
  --paper: var(--brand-deep);
  --surface: var(--brand-deep);
  --accent: var(--accent-lift);
}
.eyebrow {
  display: inline-block; color: var(--accent); font-size: .74rem; font-weight: 650;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: .9rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 1px; background: currentColor; vertical-align: middle; margin-inline-end: .6rem; opacity: .7; }
.lead { font-size: 1.09rem; color: var(--muted); max-width: 62ch; }
.prose { max-width: 66ch; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.head { max-width: 68ch; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3rem); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand-deep); color: var(--on-dark);
  padding-block: clamp(4rem, 2.4rem + 7vw, 8.5rem) clamp(3.5rem, 2rem + 5vw, 6rem);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(820px 460px at 88% 4%, color-mix(in oklab, var(--accent) 15%, transparent), transparent 60%),
    radial-gradient(680px 420px at 6% 96%, color-mix(in oklab, #2b6d64 30%, transparent), transparent 62%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(242,246,245,.22) .6px, transparent .6px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 72%);
}
.hero > * { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); align-items: end; }
.hero h1 { margin-bottom: 1.1rem; max-width: 20ch; }
/* Reserve the height the hero copy will occupy once the webfont has
   loaded. Without this the Arabic font swap reflows the paragraph and
   produces a measurable layout shift on first paint. The reserve is on
   the grid itself, not a column, because the shift originates in
   whichever column the browser re-lays out first. */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); align-items: end; }
.hero h1 em { font-style: normal; color: var(--accent-lift); }
.hero__sub { max-width: 58ch; color: var(--on-dark-soft); font-size: clamp(1.06rem, 1rem + .45vw, 1.26rem); margin-bottom: 2rem; }
.hero__quote {
  margin: 0; padding-inline-start: 1.4rem;
  border-inline-start: 2px solid var(--accent);
  font-family: var(--serif); font-size: clamp(1.12rem, 1rem + .6vw, 1.35rem);
  color: var(--on-dark); line-height: 1.45;
}
.hero__quote cite { display: block; margin-top: .9rem; font-family: var(--sans); font-style: normal; font-size: .82rem; color: var(--on-dark-soft); letter-spacing: .04em; }

.trust { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; list-style: none; margin: 2.5rem 0 0; padding: 0; }
.trust__item {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--on-dark-soft); font-size: .86rem;
}
.trust__item svg { width: .95em; height: .95em; color: var(--accent-lift); flex: none; }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.1rem; }
.card {
  position: relative; padding: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
  background: var(--glass); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--glass-border-hover); box-shadow: var(--sh-lg); }
.card__n { display: inline-block; margin-bottom: .9rem; font-family: var(--serif); font-size: .95rem; font-weight: 500; color: var(--accent); letter-spacing: .06em; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }
.card__list { list-style: none; margin: 1.1rem 0 0; padding: 1.1rem 0 0; display: grid; gap: .45rem; border-top: 1px solid var(--line-soft); }
.card__list li { position: relative; padding-inline-start: 1.15rem; color: var(--muted); font-size: .91rem; }
.card__list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- sector pills ---------- */
.sectors { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.pill {
  padding: .55rem 1.05rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-soft); font-size: .92rem;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.dark .pill, .band--ink .pill { background: rgba(255,255,255,.06); border-color: var(--on-dark-line); color: var(--on-dark-soft); }
.dark .pill:hover, .band--ink .pill:hover { border-color: var(--accent-lift); color: var(--on-dark); }
/* ---------- process ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); }
.step { position: relative; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.dark .step, .band--ink .step { border-top-color: var(--on-dark-line); }
.step__n { display: block; font-family: var(--serif); font-size: .95rem; color: var(--accent); margin-bottom: .6rem; letter-spacing: .05em; }
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- contact ---------- */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1.4rem + 3vw, 4rem); align-items: start; }
.email-panel {
  padding: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem);
  background: var(--glass); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.email-panel__label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.email-panel a { font-size: clamp(1.1rem, 1rem + .8vw, 1.5rem); font-weight: 600; color: var(--brand); text-decoration: none; word-break: break-word; }
.email-panel a:hover { text-decoration: underline; }
.email-panel p { color: var(--muted); font-size: .94rem; margin: 1rem 0 0; }

.audience { display: grid; gap: 1.1rem; }
.audience__col { padding: clamp(1.5rem, 1.2rem + 1vw, 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.audience__col h3 { margin-bottom: .45rem; }
.audience__col p { color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--brand-ink); color: var(--on-dark); padding-block: clamp(2.75rem, 2rem + 3vw, 4.5rem) 1.6rem; margin-top: clamp(3rem, 2rem + 4vw, 6rem); }
.foot__cols { display: grid; grid-template-columns: 1.7fr repeat(2, 1fr); gap: clamp(1.75rem, 1.2rem + 2vw, 3.5rem); }
.foot__brand p { color: var(--on-dark-soft); font-size: .93rem; max-width: 34ch; margin: .9rem 0 0; }
.foot__h { font-size: .8rem; letter-spacing: .11em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 1rem; }
.foot__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot__list a, .foot__list span { color: var(--on-dark-soft); text-decoration: none; font-size: .93rem; }
.foot__list a:hover { color: var(--accent-lift); text-decoration: underline; }
.foot__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--on-dark-line); margin-top: clamp(2rem, 1.5rem + 1.5vw, 3rem); padding-top: 1.35rem; font-size: .85rem; color: var(--on-dark-soft); }
.foot__bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot__bar a { color: var(--on-dark-soft); text-decoration: none; }
.foot__bar a:hover { color: var(--accent-lift); }

/* Credit line — deliberately the quietest thing in the footer. */
.foot__credit {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--on-dark-line);
  font-size: .78rem;
  color: var(--on-dark-soft);
  opacity: .8;
}
.foot__credit a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color .18s var(--ease), border-color .18s var(--ease); }
.foot__credit a:hover { color: var(--accent-lift); border-bottom-color: currentColor; }
.foot__credit a:focus-visible { outline: 2px solid var(--accent-lift); outline-offset: 3px; border-radius: 2px; }

/* ---------- mobile drawer ---------- */
.drawer { display: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; min-height: 74px; border-bottom: 1px solid var(--line); }
.drawer__list { display: grid; gap: .2rem; padding-top: 1.25rem; }
.drawer__list a { display: flex; align-items: center; justify-content: space-between; padding: .95rem .25rem; font-size: 1.1rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.drawer__list a:hover { color: var(--brand); }
/* ---------- legal / prose pages ---------- */
.prose-page { max-width: 72ch; }
.prose-page h2 { margin-top: 2.75rem; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.65rem); scroll-margin-top: 96px; }
.prose-page h3 { margin-top: 1.75rem; font-size: 1.08rem; }
.prose-page ul, .prose-page ol { padding-inline-start: 1.3rem; color: var(--ink-soft); }
.prose-page li { margin-bottom: .5rem; }
.prose-page table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.prose-page th, .prose-page td { text-align: start; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose-page th { font-weight: 600; color: var(--ink); }

/* ---------- cookie notice ---------- */
.cookie {
  position: fixed; z-index: 90;
  inset-inline: 1rem; bottom: 1rem;
  max-width: 30rem; margin-inline-start: auto;
  padding: 1.15rem 1.3rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: .9rem; line-height: 1.55;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.cookie[data-show="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cookie p { margin: 0 0 .8rem; color: var(--ink-soft); }
.cookie a { color: var(--brand); font-weight: 600; }
.cookie__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie__actions .btn { min-height: 38px; padding: .45rem .9rem; font-size: .87rem; }

/* ---------- web font loading ----------
   Arabic webfonts reflow noticeably when they swap in, which cost ~0.07
   CLS in the hero. Two mitigations:

   1. A metric-adjusted fallback, so the pre-swap text is already close
      to the webfont's metrics.
   2. The font files are preloaded, so the swap happens as early as
      possible — see the <link rel="preload"> in each page's <head>.

   Values are deliberately conservative: an over-scaled fallback shifts
   text further than the swap it was meant to prevent. */
@font-face {
  font-family: "Plex Fallback";
  src: local("Segoe UI"), local("Tahoma"), local("Arial");
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
:root { --font-fallback: "Plex Fallback", "Segoe UI", system-ui, sans-serif; }

/* ---------- theme: dark mode ----------
   Applied via [data-theme] on <html>, set by an inline script before
   paint to avoid a flash. Follows the OS preference by default. */
:root[data-theme="dark"] {
  --paper:      #0c1113;
  --surface:    #121a1d;
  --ink:        #e8edec;
  --ink-soft:   #b3c0be;
  --muted:      #8d9c9a;
  --line:       #23302f;
  --line-soft:  #1a2423;
  /* A lighter teal reads as text on the dark surface, but white-on-teal
     only reaches 3.3:1, so the button fill needs its own deeper token. */
  --brand:      #6fc3b3;
  --brand-fill: #17534c;
  --brand-deep: #0a1715;
  --brand-ink:  #060f0e;
  --accent:     #d9a24e;
  --accent-lift:#e0b469;
  --accent-tint:#1d1913;
  --on-dark:      #eef4f2;
  --on-dark-soft: #a9bcb9;
  --on-dark-line: rgba(255,255,255,.14);
  --sh-sm: 0 1px 2px rgba(0,0,0,.4);
  --sh-md: 0 4px 16px rgba(0,0,0,.45);
  --sh-lg: 0 18px 48px rgba(0,0,0,.55);
}
/* Components that hard-code light values need overriding in dark. */
:root[data-theme="dark"] .btn--ondark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
:root[data-theme="dark"] .hero { border-radius: 0; }
:root[data-theme="dark"] .cookie { background: var(--surface); }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .email-panel,
:root[data-theme="dark"] .audience__col { background: var(--surface); }
:root[data-theme="dark"] .site-head { background: color-mix(in oklab, var(--paper) 82%, transparent); }

/* Theme toggle button */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.theme-btn:hover { background: var(--surface); color: var(--ink); border-color: var(--muted); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }

/* ---------- animated ambient background ----------
   Slow, low-contrast drift. Absolutely positioned and clipped so it can
   never affect document height — as a normal flow child it inflated
   <main> and caused a large cumulative layout shift on the Arabic page.
   Respects reduced-motion (frozen in the media query at the end). */
.ambient {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none; z-index: 0;
  contain: strict;
}
.ambient__blob {
  position: absolute; border-radius: 50%;
  will-change: transform;
}
.ambient__blob--1 {
  width: 46vmax; height: 46vmax; top: -12%; inset-inline-start: -8%;
  background: radial-gradient(circle, color-mix(in oklab, var(--brand) 42%, transparent), transparent 70%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.ambient__blob--2 {
  width: 38vmax; height: 38vmax; bottom: -18%; inset-inline-end: -6%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 32%, transparent), transparent 70%);
  animation: drift2 32s var(--ease) infinite alternate;
}
.ambient__blob--3 {
  width: 30vmax; height: 30vmax; top: 34%; inset-inline-start: 46%;
  background: radial-gradient(circle, color-mix(in oklab, #2b6d64 30%, transparent), transparent 70%);
  animation: drift3 38s var(--ease) infinite alternate;
}
@keyframes drift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6%,4%,0) scale(1.12); } }
@keyframes drift2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-7%,-5%,0) scale(.94); } }
@keyframes drift3 { from { transform: translate3d(0,0,0) scale(.95); } to { transform: translate3d(5%,-6%,0) scale(1.1); } }

/* ---------- micro-interactions ---------- */
.btn:active { transform: translateY(0) scale(.985); }
.nav__link { transition: color .18s var(--ease), opacity .18s var(--ease); }
.pill { transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease); }
.pill:hover { transform: translateY(-2px); }
.audience__col, .email-panel { transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease); }
.audience__col:hover, .email-panel:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: color-mix(in oklab, var(--brand) 26%, var(--line)); }
.email-panel a { transition: color .18s var(--ease); }
.email-panel a:hover { color: var(--accent); }
.trust__item { transition: background .25s var(--ease), border-color .25s var(--ease); }
.trust__item:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }

/* gradient sweep on the accent CTA */
.btn--accent { position: relative; overflow: hidden; }
.btn--accent::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--accent:hover::after { transform: translateX(120%); }

/* underline grows from the inline start, in both directions */
.foot__list a, .foot__bar a { position: relative; }
.foot__list a::after, .foot__bar a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: inline-start;
  transition: transform .25s var(--ease);
}
.foot__list a:hover::after, .foot__bar a:hover::after { transform: scaleX(1); }

/* ---------- scroll reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv[data-in="true"] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
  /* freeze the ambient drift entirely, not just speed it up */
  .ambient__blob { animation: none !important; }
  .btn--accent::after { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .contact-wrap { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  html { scroll-padding-top: 80px; }
  .nav, .head-cta { display: none; }
  .burger { display: block; }
  .site-head__in { justify-content: space-between; }
  .drawer[data-open="true"] {
    display: block; position: fixed; inset: 0; z-index: 60;
    overflow-y: auto; background: var(--paper); padding-bottom: 2rem;
    animation: drawerIn .24s var(--ease);
  }
  @keyframes drawerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 560px) {
  .foot__cols { grid-template-columns: 1fr; }
  .trust__item { font-size: .82rem; padding: .35rem .7rem; }
  .cookie { inset-inline: .75rem; bottom: .75rem; }
}
@media print {
  body::before, .hero::before, .hero::after, .site-head, .cookie, .drawer { display: none !important; }
  body { background: #fff; color: #000; }
}