/*! ALZAN aura motion system (20261122-aura-14, maher5). LOCAL PREVIEW — not live.
 * One sitewide layer on top of the live theme + home v3 + B4 tokens (--alz-tk-*). Native CSS first:
 * scroll-driven animations (animation-timeline: view()/scroll()), cross-document View Transitions, @supports fallbacks.
 * Everything is scoped to html.aura (set by the inline gate). Without it (no gate, reduced motion, low-end, save-data,
 * software GL) the page is the static page: nothing hidden, nothing moving.
 * Rules: only opacity / translate / transform / clip-path / object-position animate (no layout properties) → no CLS.
 * Nothing starts below opacity .4. No scroll listeners, no wheel/touch capture, no pinning. RTL via logical properties.
 * Motion profile B (rise ≈44px) below 768px, profile A (≈16px) from 768px. */

:root {
	--aura-e: var(--alz-tk-ease-out, cubic-bezier(.16, 1, .3, 1));
	--aura-e2: var(--alz-tk-ease, cubic-bezier(.2, .7, .2, 1));
	--aura-rise: 44px;          /* profile B */
	--aura-par: 22px;           /* half-range of the scroll drift (±) */
	--aura-o0: .7;              /* reveal floor: never fully invisible */
	--aura-dur: 900ms;
	--aura-tilt: 3deg;
	--aura-oak: var(--alz-tk-oak-2, #A07A55);
	--aura-ivory: var(--alz-tk-ivory, #F5F1E8);
	--aura-ring: var(--alz-tk-focus-ring, rgba(143, 118, 96, .6));
}
@media (min-width: 768px) { :root { --aura-rise: 16px; --aura-par: 12px; --aura-dur: 1000ms; } }

/* ------------------------------------------------------------------ 0. hand-off from older layers
   home v3 and alzan-motion-ab hide reveal items at opacity 0. Under aura they are driven here instead,
   and in static mode they are simply shown. */
html.aura.azh-mo [data-azh-reveal], html.aura.azh-mo [data-azh-reveal]:not(.is-in) { opacity: 1; transform: none; transition: none; }
/* live theme reveal (.alz-io …:not(.is-in) { opacity: 0 }) — shown here, animated by aura instead */
html.aura :is([data-reveal], .is-style-reveal, .alz-section, .alz-card, .alz-tile):not(.is-in) { opacity: 1; transform: none; }
html.aura-static :is([data-reveal], .is-style-reveal, .alz-section, .alz-card, .alz-tile):not(.is-in) { opacity: 1 !important; transform: none !important; }
html.aura-static [data-azh-reveal], html.aura-static [data-azh-reveal]:not(.is-in),
html.aura-static .alz-mo-below, html.aura-static .alz-mo-out {
	opacity: 1 !important; transform: none !important; transition: none !important;
}

/* ------------------------------------------------------------------ 1. hero intro (CSS only, runs at first paint)
   The media opens like a soft curtain (inset → full bleed, no scaling, so no image is ever drawn above its native size),
   then the copy panel and the sample slabs rise in with an expo-out ease. Starts at .4, not 0, so LCP text is painted at once. */
@keyframes aura-curtain { from { clip-path: inset(5% 4% 7% 4% round 28px); opacity: .4; } to { clip-path: inset(0 0 0 0 round 0); opacity: 1; } }
@keyframes aura-in { from { opacity: var(--aura-o0); translate: 0 var(--aura-rise); } to { opacity: 1; translate: 0 0; } }
@keyframes aura-in-soft { from { opacity: var(--aura-o0); } to { opacity: 1; } }
@keyframes aura-cap { from { opacity: 0; } to { opacity: 1; } }

html.aura:not(.aura-late) :is(.azh-hero__layer, .alz-preview-hero-media) { animation: aura-curtain 1400ms var(--aura-e) both; }
html.aura:not(.aura-late) :is(.azh-hero .azh-eye, .azh-hero__copy, .alz-preview-hero-panel) { animation: aura-in var(--aura-dur) var(--aura-e) 220ms both; }
html.aura:not(.aura-late) .azh-hero__slabs > li { animation: aura-in var(--aura-dur) var(--aura-e) both; animation-delay: calc(520ms + var(--aura-i, 0) * 90ms); }
html.aura:not(.aura-late) .azh-proof__list > li { animation: aura-in-soft 800ms var(--aura-e2) both; animation-delay: calc(700ms + var(--aura-i, 0) * 70ms); }
.azh-hero__slabs > li:nth-child(2), .azh-proof__list > li:nth-child(2) { --aura-i: 1; }
.azh-hero__slabs > li:nth-child(3), .azh-proof__list > li:nth-child(3) { --aura-i: 2; }
.azh-hero__slabs > li:nth-child(4), .azh-proof__list > li:nth-child(4) { --aura-i: 3; }
.azh-hero__slabs > li:nth-child(5), .azh-proof__list > li:nth-child(5) { --aura-i: 4; }
/* the «تصور توضيحي» / "Visualisation" label is never animated below full opacity for long: it fades in with the media */
html.aura:not(.aura-late) .alz-preview-caption { animation: aura-cap 600ms linear 300ms both; }

/* hero scroll-out: copy drifts up a little faster than the page (depth), media stays put */
@supports (animation-timeline: view()) {
	@keyframes aura-hero-out { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, calc(var(--aura-par) * -3), 0); } }
	html.aura :is(.azh-hero__grid, .alz-preview-hero-copy) { animation: aura-hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
}

/* ------------------------------------------------------------------ 2. animated headings (JS wraps WORDS, never letters:
   Arabic letters stay joined inside each word). Words rise from .85 (legible on every frame, Maher 22 Nov); the container floor is .88. */
html:is(.aura, .aura-static) .aura-w { display: inline-block !important; }  /* same box in both modes; beats .azh-h1 span { display: block } */
html.aura .aura-words .aura-w { opacity: .85; translate: 0 .2em; transition: opacity 450ms var(--aura-e2), translate 800ms var(--aura-e); transition-delay: calc(min(var(--wi, 0), 8) * 40ms); }
html.aura .aura-words.aura-in .aura-w { opacity: 1; translate: 0 0; }
html.aura .aura-hw { --aura-o0: .88; }

/* ------------------------------------------------------------------ 3. scroll reveals + drift (scroll-driven where supported) */
/* gated by .aura-go (added by the gate one frame after first paint) so the scroll-timeline setup is not part of the first parse/style task (mid-phone long-task budget) */
/* Targets (keep in sync with T in alzan-aura.js) */
@supports (animation-timeline: view()) {
	html.aura.aura-go:not(.aura-io) :is([data-azh-reveal], [data-reveal], .alz-card, .alz-branch, .azh-role, .alz-rng-sw > li, .azh-rail__track > li, .azh-apps__m, .alz-mk-poster__img, .alz-cta-band__inner, .x6-row li, .alz-t2 .t2-stage, .alz-p-faq details):not(:is(.azh-hero, .alz-page-hero) *) {
		animation: aura-in linear both;
		animation-timeline: view();
		animation-range: entry calc(var(--aura-i, 0) * 6%) entry calc(55% + var(--aura-i, 0) * 6%);
	}
	/* section heads also drift a little against the page (parallax depth, ± --aura-par) */
	@keyframes aura-drift { from { transform: translate3d(0, var(--aura-par), 0); } to { transform: translate3d(0, calc(var(--aura-par) * -1), 0); } }
	html.aura.aura-go:not(.aura-io) :is(.azh-headrow, .alz-head):not(:is(.azh-hero, .alz-page-hero) *) {
		animation: aura-in linear both, aura-drift linear both;
		animation-timeline: view(), view();
		animation-range: entry 0% entry 55%, cover 0% cover 100%;
	}
	/* images pan inside their frames (object-position only — never scaled, so never above native pixels) */
	@keyframes aura-pan { from { object-position: 50% 32%; } to { object-position: 50% 68%; } }
	html.aura.aura-go :is(.azh-card__fig img, .azh-role__fig img, .azh-apps__m img, .alz-mk-poster__img img, .azh-studio__room img, .alz-p-apps img) {
		animation: aura-pan linear both; animation-timeline: view(); animation-range: cover 0% cover 100%;
	}
	/* reading progress hairline (oak), compositor-only */
	@keyframes aura-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
	html.aura.aura-go .aura-progress { position: fixed; inset-block-start: 0; inset-inline: 0; block-size: 2px; z-index: 2147483000; pointer-events: none; background: var(--aura-oak); transform-origin: 0 50%; animation: aura-progress linear both; animation-timeline: scroll(root block); }
	html.aura.aura-go[dir="rtl"] .aura-progress { transform-origin: 100% 50%; }
}
/* stagger inside grids (column position, CSS only) */
:is(.alz-rng-sw, .azh-roles, .alz-grid, .azh-bento, .x6-row ul, .alz-split) > :nth-child(4n+2), :is(.alz-rng-sw, .azh-roles, .alz-grid, .alz-split) > :nth-child(4n+2) > .alz-card { --aura-i: 1; }
:is(.alz-rng-sw, .azh-roles, .alz-grid, .azh-bento, .x6-row ul) > :nth-child(4n+3) { --aura-i: 2; }
:is(.alz-rng-sw, .azh-roles, .alz-grid, .azh-bento, .x6-row ul) > :nth-child(4n+4) { --aura-i: 3; }

/* IntersectionObserver fallback (browsers without scroll-driven animations; JS adds .aura-io and marks only items BELOW the fold) */
html.aura.aura-io .aura-pend { opacity: var(--aura-o0); translate: 0 var(--aura-rise); transition: opacity 700ms var(--aura-e2), translate var(--aura-dur) var(--aura-e); transition-delay: calc(var(--aura-i, 0) * 70ms); }
html.aura.aura-io .aura-pend.aura-in { opacity: 1; translate: 0 0; }

/* ------------------------------------------------------------------ 4. liquid glass: pointer sheen + rim light + tilt (fine pointers only)
   JS injects one <i class="aura-sheen"> per card (absolute, inset 0 → no layout change). */
.aura-sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity 400ms var(--aura-e2); }
@media (hover: hover) and (pointer: fine) {
	html.aura .aura-sheen {
		background:
			radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .13), rgba(255, 255, 255, .04) 38%, transparent 62%);
		mix-blend-mode: screen;
	}
	/* rim light: a 1px gradient ring that turns toward the pointer (mask keeps only the border) */
	html.aura .aura-sheen::before {
		content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
		background: conic-gradient(from var(--ma, 180deg) at 50% 50%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .06) 25%, rgba(160, 122, 85, .35) 50%, rgba(255, 255, 255, .06) 75%, rgba(255, 255, 255, .55));
		-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
		mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	}
	html.aura .aura-lg.is-hot > .aura-sheen { opacity: 1; }
	html.aura .aura-tilt { transition: transform 600ms var(--aura-e), box-shadow 600ms var(--aura-e); transform: translate3d(0, var(--dy, 0px), 0) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
	html.aura .aura-tilt.is-hot { transition-duration: 160ms, 600ms; box-shadow: 0 28px 60px rgba(0, 0, 0, .42); }
	/* glass buttons: soft lift */
	html.aura :is(.azh-btn, .wp-block-button__link, .alz-btn, .alz-tk-btn) { transition: transform 300ms var(--aura-e), background-color 300ms, box-shadow 300ms; }
	html.aura :is(.azh-btn, .wp-block-button__link, .alz-btn, .alz-tk-btn):hover { transform: translateY(-2px); }
}

/* ------------------------------------------------------------------ 5. sample grids (alzan-aura-grid.js): zoom capped at native px,
   compare 2 decors. Controls float (position: fixed) so nothing on the page has to make room for late JS. */
.aura-zimg { transition: transform 450ms var(--aura-e); }
.aura-zimg.is-zoom { transition-duration: 200ms; cursor: zoom-in; }
.aura-pill { position: fixed; z-index: 2147482000; inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline-start: 50%; translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(10, 9, 8, .84); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 34px rgba(0, 0, 0, .4); max-inline-size: calc(100vw - 120px); }
[dir="rtl"] .aura-pill { translate: 50% 0; }
.aura-pill[hidden] { display: none; }
html.aura .aura-pill:not([hidden]) { animation: aura-in 500ms var(--aura-e) both; }
.aura-bar__btn { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding-inline: 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); color: var(--aura-ivory); font: 500 .875rem/1 var(--alz-tk-font-ui, "Inter Tight", "IBM Plex Sans Arabic", system-ui, sans-serif); cursor: pointer; white-space: nowrap; }
.aura-bar__btn--sm { padding-inline: 14px; }
.aura-bar__btn[aria-pressed="true"] { background: var(--aura-ivory); color: #0b0d11; }
.aura-bar__btn[hidden] { display: none; }
.aura-bar__msg { font: 400 .8125rem/1.3 var(--alz-tk-font-ui, system-ui, sans-serif); color: #e6dfd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aura-bar__msg:empty { display: none; }
:is(.aura-bar__btn, .aura-pick):focus-visible { outline: 2px solid var(--aura-ivory); outline-offset: 3px; box-shadow: 0 0 0 6px var(--aura-ring); }
.aura-pick { position: absolute; inset: 0; z-index: 4; display: none; border: 0 !important; padding: 0 !important; margin: 0; min-height: 0 !important; background: transparent !important; border-radius: inherit; cursor: pointer; }
.aura-cmpmode .aura-pick { display: block; }
.aura-pick::after { content: ""; position: absolute; inset-block-start: 10px; inset-inline-end: 10px; inline-size: 28px; block-size: 28px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); background: rgba(10, 12, 16, .5); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.aura-pick[aria-pressed="true"]::after { background: var(--aura-ivory) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d11' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--aura-ivory); }
.aura-cmpmode > :is(li, article) { position: relative; }
.aura-cmpmode > :is(li, article):has(.aura-pick[aria-pressed="true"]) { outline: 2px solid var(--aura-ivory); outline-offset: 3px; border-radius: 16px; }
dialog.aura-cmp { inline-size: min(1100px, 92vw); max-block-size: 88vh; overflow: auto; box-sizing: border-box; padding: clamp(12px, 2vw, 22px); border-radius: var(--alz-tk-radius-md, 22px); border: 1px solid rgba(255, 255, 255, .28); background: rgba(20, 17, 14, .82); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 30px 80px rgba(0, 0, 0, .55); color: var(--aura-ivory); }
dialog.aura-cmp::backdrop { background: rgba(6, 5, 4, .62); }
html.aura dialog.aura-cmp[open] { animation: aura-in 420ms var(--aura-e) both; }
.aura-cmp__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 20px); align-items: start; }
.aura-cmp figure { margin: 0; display: grid; gap: 8px; justify-items: center; }
.aura-cmp__img { overflow: hidden; border-radius: 14px; inline-size: 100%; }
.aura-cmp__img img { display: block; inline-size: 100%; block-size: auto; max-block-size: 66vh; object-fit: contain; }
.aura-cmp figcaption { font: 500 .875rem/1.35 var(--alz-tk-font-ui, system-ui, sans-serif); text-align: center; }
.aura-cmp figcaption b { display: block; font-weight: 700; letter-spacing: .02em; }
.aura-cmp__tools { display: flex; justify-content: flex-end; margin-block-end: 10px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { dialog.aura-cmp, .aura-pill { background: rgba(18, 16, 14, .96); } }
/* surface-gallery filter: items that appear fade up from .4 */
@keyframes aura-pop { from { opacity: .4; translate: 0 12px; } }
html.aura .aura-pop { animation: aura-pop 420ms var(--aura-e) both; }

/* mobile rail: one gentle swipe hint when it first shows (touch only, twice, then never again) */
@keyframes aura-nudge { 0%, 60%, 100% { translate: 0 0; } 75% { translate: -18px 0; } 88% { translate: 6px 0; } }
@keyframes aura-nudge-rtl { 0%, 60%, 100% { translate: 0 0; } 75% { translate: 18px 0; } 88% { translate: -6px 0; } }
@media (hover: none) and (pointer: coarse) {
	html.aura .aura-nudge > li:first-child { animation: aura-nudge 2.4s var(--aura-e) 2; }
	html.aura[dir="rtl"] .aura-nudge > li:first-child { animation-name: aura-nudge-rtl; }
}

/* ------------------------------------------------------------------ 6. page transitions
   Native: cross-document View Transitions (same-origin navigations; both pages carry this CSS).
   The header keeps its own name so it stays still while the page underneath changes.
   Fallback (no cross-document VT): JS dims the page 160 ms before following the link; the new page fades up from .4. */
@view-transition { navigation: auto; }
html.aura .alz-header { view-transition-name: alz-header; }
@keyframes aura-vt-out { to { opacity: 0; transform: translateY(-14px) scale(.992); } }
@keyframes aura-vt-in { from { opacity: 0; transform: translateY(var(--aura-rise)); } }
html.aura::view-transition-old(root) { animation: aura-vt-out 260ms var(--aura-e2) both; }
html.aura::view-transition-new(root) { animation: aura-vt-in 560ms var(--aura-e) 60ms both; }
html:not(.aura)::view-transition-group(*), html:not(.aura)::view-transition-old(*), html:not(.aura)::view-transition-new(*) { animation: none !important; }
html.aura:not(.aura-vt) body { transition: opacity 160ms linear; }
html.aura.aura-leave:not(.aura-vt) body { opacity: .4; }
@keyframes aura-enter { from { opacity: .4; } }
html.aura.aura-enter:not(.aura-vt) body { animation: aura-enter 420ms var(--aura-e2) both; }

/* ------------------------------------------------------------------ 7. keyboard focus (always on, motion or not) */
html :is(.azh-card, .alz-card, .alz-rng-sw figure, .azh-rail__track figure):focus-within { outline: 2px solid rgba(245, 241, 232, .7); outline-offset: 3px; }

/* ------------------------------------------------------------------ 8. reduced motion / static: hard stop */
@media (prefers-reduced-motion: reduce) {
	html *, html *::before, html *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
	.aura-w { opacity: 1 !important; translate: none !important; }
	.aura-tilt { transform: none !important; }
}
html.aura-static :is(.aura-w, .aura-pend) { opacity: 1 !important; translate: none !important; transition: none !important; }
html.aura-static .aura-progress, html.aura-static .aura-sheen { display: none; }
html.aura-static .aura-tilt { transform: none !important; }
html.aura-static .aura-zimg { transition: none !important; }

html.aura .aura-depth { transform: translate3d(0, var(--dy, 0px), 0); }
@media (hover: hover) and (pointer: fine) { html.aura .aura-depth.aura-tilt { transform: translate3d(0, var(--dy, 0px), 0) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); } html.aura .aura-depth.aura-tilt:not(.is-hot) { transition: box-shadow 600ms var(--aura-e); } }
/* ------------------------------------------------------------------ 9. story pages (alzan-aura-story.js, GSAP): chapter rail */
.aura-chapters { position: fixed; z-index: 2147481000; inset-inline-end: 18px; inset-block-start: 50%; translate: 0 -50%; opacity: 0; pointer-events: none; transition: opacity 400ms var(--aura-e2); }
.aura-chapters.is-on { opacity: 1; pointer-events: auto; }
.aura-chapters ol { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(14, 12, 10, .5); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.aura-chapters a { position: relative; display: flex; align-items: center; justify-content: center; min-block-size: 32px; min-inline-size: 36px; border-radius: 10px; color: #c8c1b5; text-decoration: none; font: 500 .75rem/1.2 var(--alz-tk-font-ui, "Inter Tight", "IBM Plex Sans Arabic", system-ui, sans-serif); }
.aura-chapters__n { font-variant-numeric: tabular-nums; letter-spacing: .08em; color: var(--aura-oak); }
/* titles float beside the rail (absolute → the rail never changes size, so nothing shifts) */
.aura-chapters__t { position: absolute; inset-inline-end: calc(100% + 10px); inset-block-start: 50%; translate: 0 -50%; padding: 6px 10px; border-radius: 10px; background: rgba(14, 12, 10, .72); border: 1px solid rgba(255, 255, 255, .18); color: var(--aura-ivory); white-space: nowrap; max-inline-size: 28ch; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none; transition: opacity 250ms var(--aura-e2); }
.aura-chapters a:is(:hover, :focus-visible) .aura-chapters__t { opacity: 1; }
.aura-chapters a[aria-current] { color: var(--aura-ivory); background: rgba(255, 255, 255, .08); }
.aura-chapters a:focus-visible { outline: 2px solid var(--aura-ivory); outline-offset: 2px; }
html.aura-static .aura-chapters { display: none; }
/* optional Lenis (?lenis=1): its own stylesheet is loaded with it; nothing here changes native scrolling otherwise */

/* ------------------------------------------------------------------ 10. hand-off details
   alzan-motion-ab.js is switched off by the gate (html.alz-mo). It used to stop other card animations
   (html.alz-mo-on .alz-mo-t { animation: none }); without it the x4 card sweep re-runs on scroll and Chrome counts
   layout shifts on the news cards. Aura has its own hover sheen, so the automatic sweep is turned off here. */
html:is(.aura, .aura-static) :is(.alz-card, .x-card).x4-sheen::after { animation: none !important; opacity: 0 !important; }

/* ------------------------------------------------------------------ 11. loop-video slots (maher4 media, wired only when final; see MEDIA-SLOTS.md) */
video.aura-loop { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms ease; pointer-events: none; }
video.aura-loop.is-on { opacity: 1; }
html.aura-static video.aura-loop { display: none !important; }

/* ------------------------------------------------------------------ 12. legibility (Maher 22 Nov 13:30: white text, clear, high quality) — both modes */
/* near-white text; WCAG AA checked by tools/contrast.js (axe-core + screenshot sampling under text) */
html:is(.aura, .aura-static) body { color: #ECE6DC; }
html:is(.aura, .aura-static) :is(p, li, dd, figcaption, .alz-crumbs a, nav[aria-label] ol a) { color: #ECE6DC; }
html:is(.aura, .aura-static) .alz-branch__n { color: rgba(251, 248, 242, .92); font-weight: 500; }
/* solid scrims behind every text that sits on a photo / video / decor plate */
html:is(.aura, .aura-static) :is(.azh-pill, .azh-btn--glass, .azh-code, .azh-badge, .azh-scrim) { background-color: rgba(8, 7, 6, .84) !important; color: #F7F3EC !important; }
html:is(.aura, .aura-static) .alz-preview-caption { color: #F7F3EC !important; background: linear-gradient(180deg, rgba(8, 7, 6, 0), rgba(8, 7, 6, .9) 35%) !important; }
html:is(.aura, .aura-static) .alz-mood__plate :is(.alz-p2-caps, .alz-p2-code, .alz-mood__note) { color: #F7F3EC !important; background: rgba(8, 7, 6, .8); padding-inline: 6px; margin-inline: -6px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
/* hero (still, loop video and the curtain intro): a gradient scrim always sits between the media and the copy */
html:is(.aura, .aura-static) :is(.azh-hero__layer, .alz-preview-hero-media)::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, rgba(7, 6, 5, .1) 0%, rgba(7, 6, 5, .55) 55%, rgba(7, 6, 5, .85) 100%); }
@media (min-width: 768px) { html:is(.aura, .aura-static) .azh-hero__layer::after { background: linear-gradient(90deg, rgba(7, 6, 5, .82) 0%, rgba(7, 6, 5, .55) 45%, rgba(7, 6, 5, .15) 80%); }
	html:is(.aura, .aura-static)[dir="rtl"] .azh-hero__layer::after { background: linear-gradient(270deg, rgba(7, 6, 5, .82) 0%, rgba(7, 6, 5, .55) 45%, rgba(7, 6, 5, .15) 80%); } }
html:is(.aura, .aura-static) .alz-preview-hero-media::after { background: linear-gradient(180deg, rgba(7, 6, 5, 0) 45%, rgba(7, 6, 5, .6) 100%); }
/* glass panels keep enough body behind text even when the blur is not supported */
html:is(.aura, .aura-static) .azh-glass { background-color: rgba(10, 9, 8, .72); }
/* Arabic: no thin weights, no letter-spacing. Plex 300/400 render with the Medium file (Arabic range only); headings 600+ */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 300; font-display: swap; src: url('/wp-content/themes/alzan/assets/fonts/IBMPlexSansArabic-Medium.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/themes/alzan/assets/fonts/IBMPlexSansArabic-Medium.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
html[lang^="ar"]:is(.aura, .aura-static) :is(h1, h2, h3, h4, .azh-h1, .azh-h2, .azh-h3, .alz-h1, .alz-h2, .alz-h3) { font-weight: 600; }
html[lang^="ar"]:is(.aura, .aura-static) body, html[lang^="ar"]:is(.aura, .aura-static) body *:not([dir="ltr"]):not([dir="ltr"] *) { letter-spacing: 0 !important; }

/* ------------------------------------------------------------------ 13. maher4 media (22 Nov FINAL): where-used grid, static fallbacks */
.aura-where { display: grid; gap: clamp(12px, 2vw, 20px); grid-template-columns: 1fr; margin-block: var(--alz-tk-space-5, 24px); }
@media (min-width: 768px) { .aura-where { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aura-where__item { position: relative; margin: 0; border-radius: var(--alz-tk-radius-md, 22px); overflow: hidden; }
.aura-where__item img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 768px) { .aura-where__item img { aspect-ratio: 3 / 2; } }
.aura-where__item .alz-preview-caption { position: absolute; inset-inline: 0; inset-block-end: 0; margin: 0; padding: 28px 14px 12px; font-size: .8125rem; }
html.aura-static .azh-hero__video { display: none !important; }
/* legibility follow-ups from tools/contrast.js (22 Nov 13:55) */
html:is(.aura, .aura-static) .alz-branch .alz-branch__n { color: #FBF8F2 !important; opacity: 1 !important; }
html:is(.aura, .aura-static) .x-panel figcaption, html:is(.aura, .aura-static) figure[data-mat] > figcaption { background: rgba(8, 7, 6, .86) !important; color: #F7F3EC !important; }
html:is(.aura, .aura-static) figure[data-mat] > figcaption * { color: #F7F3EC !important; }
html:is(.aura, .aura-static) .alz-crumbs ol { inline-size: fit-content; max-inline-size: 100%; background: rgba(8, 7, 6, .8); border-radius: 999px; padding: 4px 12px; }
html:is(.aura, .aura-static) .alz-crumbs :is(a, span) { color: #F7F3EC !important; }
html:is(.aura, .aura-static) .alz-header { background-color: rgba(8, 7, 6, .78); }

/* ------------------------------------------------------------------ 14. First-layout budget (v1.1)
 * Trace (4× CPU, 390, AR): the first long task was UpdateStyleAndLayout of the whole page,
 * then (after that was skipped) deferred scripts stacked at parse-end, including aura.js
 * getBoundingClientRect() of headings in skipped subtrees (which forced a full layout).
 * content-visibility:auto skips off-screen sections. contain-intrinsic-size must match the
 * real height: a too-large fallback (and a :is() specificity trap) caused veneer CLS on
 * .alz-chips-list. Overrides live in their own rules so :is() cannot inflate specificity.
 * Variable-height blocks (gallery groups, .x6-row) are left alone on purpose. */
html:is(.aura, .aura-static) :is(
	.azh-studio, .azh-rail, .azh-apps, .azh-serve, .alz-home-news, .alz-branches, .azh-cta,
	.alz-p-cols, .alz-p-apps, .alz-p-related, .alz-p-faq, .alz-mk-poster, .alz-t2
) {
	content-visibility: auto;
	contain-intrinsic-size: auto 800px;
}
html:is(.aura, .aura-static) footer.alz-footer {
	content-visibility: auto;
	contain-intrinsic-size: auto 1709px;
}
html:is(.aura, .aura-static) .alz-rng-sw > li {
	content-visibility: auto;
	contain-intrinsic-size: auto 218px;
}
@media (max-width: 767px) {
	html:is(.aura, .aura-static) .azh-studio { contain-intrinsic-size: auto 748px; }
	html:is(.aura, .aura-static) .azh-rail { contain-intrinsic-size: auto 679px; }
	html:is(.aura, .aura-static) .azh-apps { contain-intrinsic-size: auto 2291px; }
	html:is(.aura, .aura-static) .azh-serve { contain-intrinsic-size: auto 2063px; }
	html:is(.aura, .aura-static) .alz-home-news { contain-intrinsic-size: auto 1709px; }
	html:is(.aura, .aura-static) .alz-branches { contain-intrinsic-size: auto 2322px; }
	html:is(.aura, .aura-static) .azh-cta { contain-intrinsic-size: auto 484px; }
	html:is(.aura, .aura-static) footer.alz-footer { contain-intrinsic-size: auto 1709px; }
	html:is(.aura, .aura-static) .alz-t2 { contain-intrinsic-size: auto 1419px; }
	html:is(.aura, .aura-static) .alz-p-cols { contain-intrinsic-size: auto 1458px; }
	html:is(.aura, .aura-static) .alz-p-apps { contain-intrinsic-size: auto 2767px; }
	html:is(.aura, .aura-static) .alz-p-related { contain-intrinsic-size: auto 552px; }
	html:is(.aura, .aura-static) .alz-p-faq { contain-intrinsic-size: auto 524px; }
	html:is(.aura, .aura-static) .alz-mk-poster { contain-intrinsic-size: auto 717px; }
	html:is(.aura, .aura-static) .alz-rng-sw > li { contain-intrinsic-size: auto 218px; }
}
@media (min-width: 768px) {
	html:is(.aura, .aura-static) .azh-studio { contain-intrinsic-size: auto 1007px; }
	html:is(.aura, .aura-static) .azh-rail { contain-intrinsic-size: auto 762px; }
	html:is(.aura, .aura-static) .azh-apps { contain-intrinsic-size: auto 3226px; }
	html:is(.aura, .aura-static) .azh-serve { contain-intrinsic-size: auto 1077px; }
	html:is(.aura, .aura-static) .alz-home-news { contain-intrinsic-size: auto 1070px; }
	html:is(.aura, .aura-static) .alz-branches { contain-intrinsic-size: auto 1312px; }
	html:is(.aura, .aura-static) .azh-cta { contain-intrinsic-size: auto 582px; }
	html:is(.aura, .aura-static) footer.alz-footer { contain-intrinsic-size: auto 786px; }
	html:is(.aura, .aura-static) .alz-t2 { contain-intrinsic-size: auto 937px; }
	html:is(.aura, .aura-static) .alz-p-cols { contain-intrinsic-size: auto 892px; }
	html:is(.aura, .aura-static) .alz-p-apps { contain-intrinsic-size: auto 780px; }
	html:is(.aura, .aura-static) .alz-p-related { contain-intrinsic-size: auto 456px; }
	html:is(.aura, .aura-static) .alz-p-faq { contain-intrinsic-size: auto 567px; }
	html:is(.aura, .aura-static) .alz-mk-poster { contain-intrinsic-size: auto 662px; }
	html:is(.aura, .aura-static) .alz-rng-sw > li { contain-intrinsic-size: auto 191px; }
}

/* ------------------------------------------------------------------ 15. v4 live-home CLS (20261122-aura-14)
 * Live home markup differs from the local preview (x5-show card strip, alz-home-mats chapters,
 * alz-home-segments role grid). Two layout jumps showed up only on the live pages:
 *  (a) alzan-x5.js capPanel writes --nw/--nh from img.naturalWidth. LiteSpeed lazy images can
 *      report 1×1, so `width: min(var(--nw), 70vw)` collapses the .x-panel and everything below
 *      (.alz-home-segments, captions) jumps. Reserve a stable card box and ignore tiny vars.
 *  (b) alzan-x4.css (render-blocking) still gives the desktop runway `calc(var(--n)*70vh + 100vh)`
 *      until alzan-x5.css (in the LiteSpeed combined sheet) sets height:auto. Repeat that override
 *      here so it is present with the Aura gate, before first paint.
 *  (c) min-heights below were measured on live 22 Nov 2026 (EN/AR, max of the pair) so late
 *      theme CSS cannot grow those sections from an unstyled 0. Transform/opacity only for motion.
 * Variable-height tools / filters stay untouched. */
html:is(.aura, .aura-static) .x5-show .x-show__runway,
html:is(.aura, .aura-static) .x-show.x5-show .x-show__runway {
	height: auto !important;
}
html:is(.aura, .aura-static) .x5-show .x-show__sticky,
html:is(.aura, .aura-static) .x-show.x5-show .x-show__sticky {
	position: relative !important;
	top: auto !important;
	height: auto !important;
	overflow: visible;
}
html:is(.aura, .aura-static) .x5-show .x-show__track,
html:is(.aura, .aura-static) .x-show.x5-show .x-show__track {
	transform: none !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}
/* Stable card box. Do not use --nw/--nh for used size: a 1px naturalWidth would collapse the box.
   object-fit:cover already fills the frame; images smaller than the box letterbox on the #111 ground. */
html:is(.aura, .aura-static) .x5-show .x-panel,
html:is(.aura, .aura-static) .x-show.x5-show .x-panel {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: min(400px, 70vw);
	height: min(450px, 60vh);
	max-width: min(400px, 70vw);
	max-height: min(450px, 60vh);
	min-width: min(280px, 70vw);
	min-height: min(320px, 50vh);
}
@media (min-width: 768px) {
	html:is(.aura, .aura-static) .x5-show .x-panel,
	html:is(.aura, .aura-static) .x-show.x5-show .x-panel {
		width: 400px;
		height: 450px;
		max-width: 400px;
		max-height: 450px;
		min-width: 400px;
		min-height: 450px;
	}
}
html:is(.aura, .aura-static) .alz-card__media { aspect-ratio: 4 / 3; }

@media (max-width: 767px) {
	html:is(.aura, .aura-static) .alz-home-why { min-height: 1322px; }
	html:is(.aura, .aura-static) .alz-home-mats { min-height: 5060px; }
	html:is(.aura, .aura-static) .x5-show, html:is(.aura, .aura-static) .x-show.x5-show { min-height: 865px; }
	html:is(.aura, .aura-static) .alz-home-segments { min-height: 2359px; }
	html:is(.aura, .aura-static) .x5-uses { min-height: 3492px; }
	html:is(.aura, .aura-static) .x5-cards { min-height: 2595px; }
	html:is(.aura, .aura-static) .alz-home-brands { min-height: 2523px; }
	html:is(.aura, .aura-static) .alz-home-news { min-height: 1853px; }
	html:is(.aura, .aura-static) .alz-home-inspiration { min-height: 2380px; }
	html:is(.aura, .aura-static) .alz-cta-band { min-height: 517px; }
	html:is(.aura, .aura-static) footer.alz-footer { min-height: 1782px; }
}
@media (min-width: 768px) and (max-width: 1279px) {
	html:is(.aura, .aura-static) .alz-home-why { min-height: 1027px; }
	html:is(.aura, .aura-static) .alz-home-mats { min-height: 3856px; }
	html:is(.aura, .aura-static) .x5-show, html:is(.aura, .aura-static) .x-show.x5-show { min-height: 727px; }
	html:is(.aura, .aura-static) .alz-home-segments { min-height: 1403px; }
	html:is(.aura, .aura-static) .x5-uses { min-height: 4786px; }
	html:is(.aura, .aura-static) .x5-cards { min-height: 2620px; }
	html:is(.aura, .aura-static) .alz-home-brands { min-height: 1446px; }
	html:is(.aura, .aura-static) .alz-home-news { min-height: 1218px; }
	html:is(.aura, .aura-static) .alz-home-inspiration { min-height: 2371px; }
	html:is(.aura, .aura-static) .alz-cta-band { min-height: 531px; }
	html:is(.aura, .aura-static) footer.alz-footer { min-height: 787px; }
}
@media (min-width: 1280px) {
	html:is(.aura, .aura-static) .alz-home-why { min-height: 1101px; }
	html:is(.aura, .aura-static) .alz-home-mats { min-height: 3677px; }
	html:is(.aura, .aura-static) .x5-show, html:is(.aura, .aura-static) .x-show.x5-show { min-height: 736px; }
	html:is(.aura, .aura-static) .alz-home-segments { min-height: 915px; }
	html:is(.aura, .aura-static) .x5-uses { min-height: 3680px; }
	html:is(.aura, .aura-static) .x5-cards { min-height: 1360px; }
	html:is(.aura, .aura-static) .alz-home-brands { min-height: 1200px; }
	html:is(.aura, .aura-static) .alz-home-news { min-height: 1300px; }
	html:is(.aura, .aura-static) .alz-home-inspiration { min-height: 2505px; }
	html:is(.aura, .aura-static) .alz-cta-band { min-height: 603px; }
	html:is(.aura, .aura-static) footer.alz-footer { min-height: 787px; }
}

/* Late software-GL: keep html.aura (no mode flip). Drop only effect layers. */
html.aura-fx-lite .aura-sheen { display: none !important; }
html.aura-fx-lite.aura .aura-tilt { transform: none !important; }
