/* ───────────────────────── الأساس والقوالب ───────────────────────── */
:root {
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Alexandria", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --accent: #ff5a36;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1320px;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --logo-h: 64px;
  --logo-h-m: 46px;
  --logo-h-f: 80px;
  --header-h: max(76px, calc(var(--logo-h) + 24px));
  --fs-display: clamp(2.5rem, 6.4vw + .4rem, 7.2rem);
  --fs-display-2: clamp(2rem, 4.4vw + .3rem, 4.6rem);
  --fs-h2: clamp(1.7rem, 2.6vw + .5rem, 3.1rem);
  --fs-lead: clamp(1.05rem, .6vw + .9rem, 1.35rem);
  --space: clamp(4.5rem, 9vw, 9rem);
}

[data-theme="noir"] {
  --bg: #0b0b0e; --bg-2: #131317; --surface: #17171c; --text: #f3efe9; --muted: #9b968e;
  --line: rgba(255, 255, 255, .1); --on-accent: #0b0b0e; --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="neon"] {
  --bg: #05070f; --bg-2: #0a1020; --surface: #0e1528; --text: #e9f1ff; --muted: #8494b3;
  --line: rgba(130, 170, 255, .14); --on-accent: #05070f; --shadow: 0 30px 80px -30px rgba(0, 20, 60, .8);
  color-scheme: dark;
}
[data-theme="paper"] {
  --bg: #f3f0e8; --bg-2: #e9e4d8; --surface: #ffffff; --text: #141311; --muted: #6c675e;
  --line: rgba(20, 19, 17, .12); --on-accent: #fff; --shadow: 0 30px 60px -30px rgba(40, 30, 10, .25);
  color-scheme: light;
}
[data-theme="sunset"] {
  --bg: #170d12; --bg-2: #22131a; --surface: #2a1820; --text: #fbeadf; --muted: #b59a8f;
  --line: rgba(255, 210, 190, .12); --on-accent: #170d12; --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.75 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, iframe, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.muted { color: var(--muted); }
.center { text-align: center; display: flex; justify-content: center; }
.sr, .sr-only-intro { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; inset-inline-start: 1rem; top: 1rem; z-index: 200; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; translate: 0 -200%; opacity: 0; transition: translate .25s, opacity .25s; }
.skip-link:focus { translate: 0 0; opacity: 1; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.full-bleed { width: 100%; }
.main { min-height: 60vh; }

.blk { padding-block: var(--space); position: relative; }
.blk.space-lg { padding-block: calc(var(--space) * 1.4); }
.blk.space-sm { padding-block: calc(var(--space) * .45); }
.blk.space-none { padding-block: 0; }
.blk-hero, .blk-marquee { padding-block: 0; }
.blk.tone-alt { background: var(--bg-2); }
.blk.tone-accent { background: var(--accent); color: var(--on-accent); --muted: color-mix(in srgb, var(--on-accent) 70%, transparent); --line: color-mix(in srgb, var(--on-accent) 22%, transparent); }
.blk.tone-inverse { background: var(--text); color: var(--bg); --muted: color-mix(in srgb, var(--bg) 65%, transparent); --line: color-mix(in srgb, var(--bg) 18%, transparent); }
.blk + .blk.tone-alt, .blk.tone-alt + .blk { border-top: 0; }

/* ───────────────────────── الطباعة ───────────────────────── */
.display { font-size: var(--fs-display); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
:lang(ar) .display { line-height: 1.18; letter-spacing: 0; }
.display-2 { font-size: var(--fs-display-2); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
:lang(ar) .display-2 { line-height: 1.22; letter-spacing: 0; }
.h-title { font-size: var(--fs-h2); }
.lead { font-size: var(--fs-lead); color: var(--muted); max-width: 46ch; line-height: 1.7; }
.intro { color: var(--muted); max-width: 52ch; font-size: 1.08rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem;
  font: 500 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--accent); }
.blk-head { margin-block-end: clamp(2rem, 4vw, 3.5rem); }
.blk-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; }
.blk-head-row .blk-head { margin-block-end: 0; }
.blk-head-row .intro { margin: 0; }
.blk-head-row + * { margin-block-start: clamp(2rem, 4vw, 3.5rem); }

.prose { max-width: 68ch; }
.prose h2, .prose h3 { margin: 2em 0 .6em; font-size: 1.45rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.prose blockquote { margin: 1.6em 0; padding-inline-start: 1.2em; border-inline-start: 2px solid var(--accent); font-size: 1.2rem; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose img { border-radius: var(--radius-sm); margin-block: 1.4em; }

/* ───────────────────────── الأزرار ───────────────────────── */
.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 2rem; }
.btn {
  --b: var(--accent);
  position: relative; display: inline-flex; align-items: center; gap: .7rem; min-height: 3.1rem;
  padding: .75rem 1.5rem; border-radius: 999px; font: 600 .98rem/1 var(--font-display); white-space: nowrap;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
  overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent;
}
.btn i { font-style: normal; display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover i { transform: translateX(calc(var(--dirx, 1) * 4px)); }
[dir="rtl"] .btn { --dirx: -1; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); }
.btn-ghost:hover { border-color: var(--text); }
.btn-link { padding-inline: 0; min-height: 0; border-radius: 0; border-bottom: 1px solid currentColor; }
.btn-sm { min-height: 2.5rem; padding: .55rem 1.1rem; font-size: .88rem; }

/* ───────────────────────── الرأس والقائمة ───────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .45s var(--ease), background-color .3s, border-color .3s;
}
.site-header.hide { transform: translateY(-100%); }
.tpl-immersive .site-header { position: fixed; inset-inline: 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tpl-immersive .site-header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); border-color: var(--line); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.header-row { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand-logo { height: var(--logo-h); width: auto; max-width: min(380px, 34vw); object-fit: contain; object-position: left center; }
[dir="rtl"] .brand-logo { object-position: right center; }
.site-footer .brand-logo { height: var(--logo-h-f); max-width: min(420px, 80vw); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: conic-gradient(from 200deg, var(--accent), color-mix(in srgb, var(--accent) 30%, #fff), var(--accent)); box-shadow: 0 0 0 1px var(--line), 0 8px 24px -8px var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 3px; background: var(--bg); clip-path: polygon(0 0, 100% 0, 100% 35%, 35% 35%, 35% 100%, 0 100%); }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font: 800 1.05rem var(--font-display); letter-spacing: -.01em; }
.brand-text small { font: 500 .7rem var(--font-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.nav { margin-inline: auto; }
.nav > ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a { display: block; padding: .55rem .9rem; border-radius: 999px; font: 500 .95rem var(--font-display); color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav a[aria-current] { background: color-mix(in srgb, var(--text) 7%, transparent); }
.has-sub > a::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-inline-start: .45rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.sub {
  position: absolute; inset-inline-start: 0; top: 100%; min-width: 220px; list-style: none; margin: 0; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; translate: 0 8px; transition: opacity .2s, translate .3s var(--ease-out), visibility .2s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; translate: 0 4px; }
.sub a { border-radius: 9px; color: var(--text); }
.sub a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.nav + .header-actions { margin-inline-start: 0; }
.switch-div { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; font: 500 .82rem var(--font-display); color: var(--muted); transition: color .2s, border-color .2s; }
.switch-div:hover { color: var(--text); border-color: var(--text); }
.switch-div .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.burger span:not(.sr) { position: absolute; inset-inline: 13px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease-out), top .4s var(--ease-out); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 55; background: var(--bg); padding-top: calc(var(--header-h) + 2rem); overflow-y: auto;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease);
}
.menu-overlay.open { clip-path: inset(0 0 0 0); }
.overlay-inner { display: grid; gap: 3rem; padding-bottom: 3rem; }
.overlay-nav { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.overlay-nav > li { border-bottom: 1px solid var(--line); overflow: hidden; }
.overlay-nav > li > a { display: flex; align-items: baseline; gap: 1rem; padding: .7rem 0; font: 800 clamp(2rem, 8vw, 3.6rem)/1.15 var(--font-display); translate: 0 110%; transition: translate .7s var(--ease-out) calc(var(--i) * 60ms + 150ms), color .2s; }
.menu-overlay.open .overlay-nav > li > a { translate: 0 0; }
.overlay-nav small { font: 500 .8rem var(--font-mono); color: var(--accent); }
.overlay-sub { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0 0 1rem; color: var(--muted); }
.overlay-side { display: grid; gap: 1.5rem; }
.overlay-switch { display: grid; font: 700 1.6rem var(--font-display); }
.overlay-switch small { font: 500 .75rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.socials { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.socials a:hover { color: var(--text); }

@media (max-width: 1080px) {
  .nav, .switch-div .lbl { display: none; }
  .burger { display: inline-block; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  :root { --header-h: max(66px, calc(var(--logo-h-m) + 20px)); }
  .site-header .brand-logo { height: var(--logo-h-m); max-width: calc(100vw - var(--gutter) * 2 - 120px); }
  .site-footer .brand-logo { height: min(var(--logo-h-f), calc(var(--logo-h-m) * 1.5)); }
  .header-actions .btn { display: none; }
  .switch-div { padding: .45rem; }
}

/* شريط التقدم */
.progress { position: fixed; top: 0; inset-inline-start: 0; z-index: 70; height: 2px; width: 100%; background: var(--accent); transform-origin: var(--origin, left); transform: scaleX(0); pointer-events: none; }
[dir="rtl"] .progress { --origin: right; }
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ───────────────────────── البانر ───────────────────────── */
.hero { position: relative; display: grid; align-items: end; overflow: clip; isolation: isolate; color: #fff; --muted: rgba(255, 255, 255, .78); }
[data-theme="paper"] .hero:not(:has(.hero-canvas)) { color: #fff; }
[data-theme="paper"] .hero:has(.hero-canvas) { color: var(--text); --muted: var(--muted); }
.hero-full { min-height: 100svh; }
.hero-large { min-height: 78svh; }
.hero-medium { min-height: 58svh; }
.tpl-standard .hero-full, .tpl-sidebar .hero-full { min-height: calc(100svh - var(--header-h)); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg > img, .hero-bg > video, .hero-bg .slides img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, calc(var(--ov) + .25)) 0%, rgba(0, 0, 0, var(--ov)) 45%, rgba(0, 0, 0, calc(var(--ov) * .4)) 100%); }
.hero:has(.hero-canvas) .hero-shade { background: radial-gradient(120% 80% at 50% 110%, color-mix(in srgb, var(--bg) 85%, transparent), transparent 60%); }
.hero-canvas { width: 100%; height: 100%; background: var(--bg); }
.bg-embed { position: absolute; top: 50%; left: 50%; width: max(100%, 177.78vh); height: max(100%, 56.25vw); translate: -50% -50%; border: 0; pointer-events: none; }
.embed-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slides { position: absolute; inset: 0; }
.slides img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease, scale 7s linear; scale: 1.06; }
.slides img.on { opacity: 1; scale: 1; }
.hero-content { padding-block: calc(var(--header-h) + 3rem) clamp(4rem, 9vh, 7rem); }
.hero .lead { margin-top: 1.4rem; }
.hero .eyebrow { color: inherit; opacity: .85; }
.align-center .hero-content { text-align: center; display: grid; justify-items: center; }
.align-center .lead { margin-inline: auto; }
.align-center .btns { justify-content: center; }
.hero-title { max-width: 16ch; }
.align-center .hero-title { max-width: 18ch; }
.scroll-cue { position: absolute; bottom: 1.6rem; inset-inline-end: var(--gutter); display: flex; align-items: center; gap: .7rem; font: 500 .72rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(currentColor, transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { translate: 0 -100%; } 60%, 100% { translate: 0 100%; } }

/* ───────────────────────── تقسيم الكلمات ───────────────────────── */
.split-w { display: inline-block; overflow: clip; vertical-align: top; padding-block: .06em; margin-block: -.06em; }
.split-w > span { display: inline-block; will-change: transform; }
.js [data-split] .split-w > span { translate: 0 110%; transition: translate 1s var(--ease-out); transition-delay: calc(var(--wi) * 55ms); }
.js [data-split].in .split-w > span { translate: 0 0; }

/* ───────────────────────── الظهور عند التمرير ───────────────────────── */
.js [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease), translate 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal="clip"] { opacity: 1; translate: none; clip-path: inset(12% 6% 12% 6% round var(--radius)); transition: clip-path 1.3s var(--ease-out); }
.js [data-reveal="scale"] { translate: none; scale: .94; transition: opacity .9s var(--ease), scale 1.2s var(--ease-out); }
.js [data-reveal].in { opacity: 1; translate: 0 0; scale: 1; clip-path: inset(0 0 0 0 round 0); }
.js [data-reveal="clip"].in { clip-path: inset(0 0 0 0 round var(--radius)); }

/* ───────────────────────── نص ───────────────────────── */
.text-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 5rem; }
.text-split .blk-head { margin: 0; }
.text-narrow { max-width: calc(68ch + var(--gutter) * 2); }
.text-narrow.align-center { text-align: center; }
.text-narrow.align-center .prose { margin-inline: auto; }
.text-narrow.align-center .eyebrow, .text-narrow.align-center .btns { justify-content: center; }
.statement { font: 700 clamp(1.7rem, 3.6vw + .4rem, 3.8rem)/1.28 var(--font-display); letter-spacing: -.015em; max-width: 26ch; margin: 0; }
.align-center .statement { margin-inline: auto; text-align: center; }
.statement .w { opacity: .18; transition: opacity .4s; }
.statement .w.on { opacity: 1; }
@media (max-width: 860px) { .text-split { grid-template-columns: 1fr; } }

/* ───────────────────────── وسائط ونص ───────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split.side-end .split-media { order: 2; }
.split-media { border-radius: var(--radius); overflow: clip; aspect-ratio: 4/5; background: var(--surface); }
.split-media img, .split-media video, .split-media a { width: 100%; height: 100%; object-fit: cover; }
.split-media .embed { aspect-ratio: auto; height: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.side-end .split-media { order: 0; } .split-media { aspect-ratio: 4/3; } }

/* ───────────────────────── صورة ومعرض ───────────────────────── */
.single-image .si-frame { overflow: clip; border-radius: var(--radius); }
.full-bleed.single-image .si-frame { border-radius: 0; }
.single-image img { width: 100%; max-height: 92vh; object-fit: cover; }
.single-image figcaption, .g-item figcaption, .pg-item figcaption, .video-block figcaption { margin-top: .8rem; font-size: .88rem; color: var(--muted); }
.gallery { display: grid; gap: clamp(.6rem, 1.4vw, 1.2rem); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.gallery-masonry { display: block; columns: var(--cols, 3) 240px; column-gap: clamp(.6rem, 1.4vw, 1.2rem); }
.gallery-masonry .g-item { break-inside: avoid; margin-bottom: clamp(.6rem, 1.4vw, 1.2rem); }
.g-item { margin: 0; }
.g-item img { width: 100%; border-radius: var(--radius-sm); transition: scale .8s var(--ease-out), filter .4s; }
.gallery-grid .g-item img { aspect-ratio: 1; object-fit: cover; }
.g-item a, .g-item .zoom { display: block; overflow: clip; border-radius: var(--radius-sm); width: 100%; }
.g-item a:hover img, .g-item .zoom:hover img { scale: 1.04; }
.zoom { cursor: zoom-in; }
.carousel { overflow: hidden; }
.gallery-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); scrollbar-width: none; cursor: grab; }
.gallery-carousel::-webkit-scrollbar { display: none; }
.gallery-carousel .g-item { flex: 0 0 min(72vw, 520px); scroll-snap-align: center; }
.gallery-carousel .g-item img { aspect-ratio: 4/3; object-fit: cover; }
.gallery-carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ───────────────────────── فيديو ───────────────────────── */
.video-frame { border-radius: var(--radius); overflow: clip; background: #000; }
.full-bleed .video-frame { border-radius: 0; }
.video-frame video { width: 100%; }
.embed { position: relative; aspect-ratio: 16/9; background: #000; overflow: clip; border-radius: inherit; }
.embed img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .4s, scale .8s var(--ease-out); }
.embed:hover img { opacity: 1; scale: 1.03; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-play {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: clamp(64px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); transition: scale .35s var(--ease-out); animation: pulse 2.4s infinite;
}
.embed-play svg { width: 34%; fill: currentColor; margin-inline-start: 6%; }
.embed-play:hover { scale: 1.08; }
.embed-play:active { scale: .95; }
@keyframes pulse { 70% { box-shadow: 0 0 0 26px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.embed-badge { position: absolute; top: 1rem; inset-inline-start: 1rem; padding: .3rem .7rem; border-radius: 999px; font: 500 .72rem var(--font-mono); background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(8px); }
.embed.playing img, .embed.playing .embed-play, .embed.playing .embed-badge { display: none; }

/* ───────────────────────── بطاقات المشاريع ───────────────────────── */
.cards { display: grid; gap: clamp(1.2rem, 2.4vw, 2.2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.cards-masonry { display: block; columns: 3 300px; column-gap: clamp(1.2rem, 2.4vw, 2.2rem); }
.cards-masonry .card { break-inside: avoid; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.cards-masonry .card:nth-child(3n+1) .card-media { aspect-ratio: 4/5; }
.cards-masonry .card:nth-child(3n+2) .card-media { aspect-ratio: 1; }
.cards-list { grid-template-columns: 1fr; }
.cards-list .card-link { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.card-link { display: block; }
.card-media { position: relative; overflow: clip; border-radius: var(--radius); aspect-ratio: 4/3; background: var(--surface); }
.card-media img, .card-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--ease-out), opacity .5s; }
.card-hover { opacity: 0; }
.card-link:hover .card-media img { scale: 1.05; }
.card-link:hover .card-hover.ready { opacity: 1; }
.card-ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent) 25%, var(--surface))); }
.card-body { padding-top: 1.1rem; display: grid; gap: .2rem; }
.card-title { font-size: clamp(1.2rem, 1vw + .9rem, 1.55rem); position: relative; display: inline; background: linear-gradient(currentColor, currentColor) no-repeat var(--bg-pos, 0) 100% / 0 1px; transition: background-size .5s var(--ease-out); justify-self: start; }
[dir="rtl"] .card-title { --bg-pos: 100%; }
.card-link:hover .card-title { background-size: 100% 1px; }
.card-meta, .card-client { margin: 0; font-size: .88rem; color: var(--muted); }
.card-meta { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.card.hidden { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button { padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); font: 500 .88rem var(--font-display); color: var(--muted); transition: all .25s; }
.filters button:hover { color: var(--text); }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 700px) { .cards-list .card-link { grid-template-columns: 1fr; gap: 0; } }

/* عرض أفقي مثبّت */
.showcase { overflow: hidden; }
.showcase-track { display: flex; gap: clamp(1rem, 2vw, 2rem); padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 1rem; }
.showcase-track::-webkit-scrollbar { display: none; }
.showcase.pinned .showcase-track { overflow: visible; scroll-snap-type: none; width: max-content; }
.sc-item { position: relative; flex: 0 0 clamp(280px, 38vw, 560px); scroll-snap-align: start; display: grid; gap: 1rem; }
.sc-media { position: relative; display: block; aspect-ratio: 4/5; border-radius: var(--radius); overflow: clip; background: var(--surface); }
.sc-media img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease-out); }
.sc-item:hover .sc-media img { scale: 1.06; }
.sc-num { position: absolute; top: 1rem; inset-inline-start: 1rem; font: 600 .78rem var(--font-mono); color: #fff; padding: .3rem .6rem; border-radius: 999px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.sc-text { display: grid; gap: .2rem; }
.sc-text b { font: 700 clamp(1.3rem, 1.4vw + .8rem, 1.9rem)/1.2 var(--font-display); }
.sc-text small { color: var(--muted); font-size: .9rem; }
.sc-item:nth-child(even) { margin-top: clamp(0rem, 6vw, 5rem); }

/* قوائم بصورة تتبع المؤشر */
.plist, .catlist { position: relative; border-top: 1px solid var(--line); }
.plist-row, .catlist-row {
  position: relative; display: grid; align-items: center; gap: 1.5rem; padding: clamp(1.2rem, 2.4vw, 2rem) 0; border-bottom: 1px solid var(--line);
  transition: padding .5s var(--ease-out), color .3s;
}
.plist-row { grid-template-columns: 3rem 1fr auto 4rem; }
.catlist-row { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.2fr) 3rem 2rem; }
.plist-row:hover, .catlist-row:hover { padding-inline-start: 1.2rem; }
.plist-n, .plist-y, .cl-count { font: 500 .8rem var(--font-mono); color: var(--muted); }
.plist-t, .cl-name { font: 700 clamp(1.4rem, 2.6vw + .4rem, 3rem)/1.15 var(--font-display); letter-spacing: -.015em; }
.plist-m, .cl-desc { color: var(--muted); font-size: .95rem; }
.cl-icon { font-size: 1.4rem; color: var(--accent); }
.cl-arrow { font-size: 1.4rem; transition: translate .4s var(--ease-out); }
.catlist-row:hover .cl-arrow { translate: calc(var(--dirx, 1) * 6px) 0; color: var(--accent); }
.hover-img { position: fixed; top: 0; left: 0; z-index: 5; width: clamp(220px, 22vw, 340px); aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; scale: .7; transition: opacity .3s, scale .45s var(--ease-out); will-change: transform; }
.hover-img.on { opacity: 1; scale: 1; }
.hover-img img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (max-width: 860px) { .hover-img { display: none; } .catlist-row { grid-template-columns: 2.4rem 1fr 2rem; } .cl-desc, .cl-count { display: none; } .plist-row { grid-template-columns: 2.4rem 1fr auto; } .plist-m { display: none; } }

/* بطاقات التصنيفات */
.catcards { display: grid; gap: clamp(1rem, 2vw, 1.6rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.catcard { position: relative; display: grid; min-height: 420px; border-radius: var(--radius); overflow: clip; isolation: isolate; color: #fff; transform-style: preserve-3d; transition: transform .5s var(--ease-out); }
.catcard-media { position: absolute; inset: 0; z-index: -1; }
.catcard-media img, .catcard-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease-out), opacity .5s; }
.catcard-media video { opacity: 0; }
.catcard:hover .catcard-media video.ready { opacity: 1; }
.catcard:hover .catcard-media img { scale: 1.07; }
.catcard-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .05) 65%); }
.catcard-body { align-self: end; display: grid; gap: .35rem; padding: 1.6rem; }
.catcard-icon { font-size: 1.6rem; color: var(--accent); }
.catcard-body b { font: 800 1.8rem/1.15 var(--font-display); }
.catcard-body small { opacity: .8; }
.catcard-body em { font: 500 .75rem var(--font-mono); font-style: normal; opacity: .7; text-transform: uppercase; letter-spacing: .1em; margin-top: .4rem; }

/* ───────────────────────── الفريق ───────────────────────── */
.team { display: grid; gap: clamp(1.4rem, 2.4vw, 2.4rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.team-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.member h3 { font-size: 1.2rem; margin-top: 1rem; }
.member-photo { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: clip; background: var(--surface); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) contrast(1.05); transition: filter .6s, scale 1s var(--ease-out); }
.member:hover .member-photo img { filter: none; scale: 1.04; }
.member-role { margin: .2rem 0 0; color: var(--accent); font: 500 .8rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.member-bio { margin: .6rem 0 0; color: var(--muted); font-size: .95rem; }
.member-links { display: flex; gap: .9rem; margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }
.member-links a:hover { color: var(--text); }

/* ───────────────────────── الأرقام ───────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 0; border-top: 1px solid var(--line); }
.stat { padding: 2rem 1.5rem 1rem 0; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: .4rem; padding-inline: 0 1.5rem; }
.stat:last-child { border: 0; }
.stat + .stat { padding-inline-start: 1.5rem; }
.stat dd { direction: ltr; justify-content: flex-end; margin: 0; font: 800 clamp(2.8rem, 5vw, 5rem)/1 var(--font-display); letter-spacing: -.03em; display: flex; align-items: baseline; gap: .15rem; }
.stat dd small { font-size: .45em; color: var(--accent); }
[dir="ltr"] .stat dd { justify-content: flex-start; }
.stat dt { color: var(--muted); }
@media (max-width: 700px) { .stat { border-inline-end: 0; border-bottom: 1px solid var(--line); padding-inline: 0 !important; } }

/* ───────────────────────── المزايا ───────────────────────── */
.features { display: grid; gap: 1px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.feature { position: relative; display: grid; align-content: start; gap: .7rem; padding: clamp(1.6rem, 3vw, 2.6rem); background: var(--bg); transition: background-color .4s; overflow: hidden; }
.tone-alt .feature { background: var(--bg-2); }
.feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.feature:hover::before { opacity: 1; }
.feature-icon { font: 600 .9rem var(--font-mono); color: var(--accent); }
.feature h3 { font-size: 1.35rem; }
.feature p { margin: 0; color: var(--muted); }
.feature-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: .6rem; }
.feature-arrow { margin-top: .4rem; color: var(--accent); transition: translate .4s var(--ease-out); }
a.feature:hover .feature-arrow { translate: calc(var(--dirx, 1) * 6px) 0; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* ───────────────────────── الشعارات ───────────────────────── */
.logo-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.lm-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.logo-marquee:hover .lm-track { animation-play-state: paused; }
.lm-set, .logo-grid { display: flex; align-items: center; gap: clamp(2.5rem, 6vw, 5rem); padding-inline-end: clamp(2.5rem, 6vw, 5rem); }
.logo-grid { flex-wrap: wrap; justify-content: center; padding: 0; }
.lm-set img, .logo-grid img { height: 44px; width: auto; filter: grayscale(1) brightness(1.6); opacity: .65; transition: opacity .3s, filter .3s; }
[data-theme="paper"] .lm-set img, [data-theme="paper"] .logo-grid img { filter: grayscale(1); }
.lm-set a:hover img, .logo-grid a:hover img { opacity: 1; filter: none; }
.lm-set span, .logo-grid span { font: 700 1.5rem var(--font-display); color: var(--muted); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .lm-track, [dir="rtl"] .mq-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ───────────────────────── الآراء ───────────────────────── */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: min(86vw, 520px); gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .5rem; }
.quotes::-webkit-scrollbar { display: none; }
.quote { margin: 0; padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-snap-align: start; display: grid; gap: 1.6rem; align-content: space-between; }
.quote p { font: 500 clamp(1.1rem, .8vw + .9rem, 1.4rem)/1.6 var(--font-display); margin: 0; }
.quote p::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--accent); margin-bottom: .6rem; }
.quote footer { display: flex; align-items: center; gap: .8rem; }
.quote footer img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote footer span { display: grid; }
.quote footer small { color: var(--muted); }

/* ───────────────────────── الصوتيات ───────────────────────── */
.tracks { display: grid; gap: .7rem; }
.track {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 1.4fr) auto auto; align-items: center; gap: 1rem;
  padding: .8rem 1.1rem .8rem .8rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: relative;
  transition: border-color .3s, background-color .3s;
}
[dir="rtl"] .track { padding: .8rem .8rem .8rem 1.1rem; }
.track.playing { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.track-play { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: scale .3s var(--ease-out); flex-shrink: 0; }
.track-play:hover { scale: 1.06; }
.track-play:active { scale: .94; }
.track-play svg { width: 20px; fill: currentColor; }
.track-play .i-pause, .track.playing .track-play .i-play { display: none; }
.track.playing .track-play .i-pause { display: block; }
.track-cover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.track-info { display: grid; min-width: 0; }
.track-info b { font: 600 1.02rem var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info span { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info em { font-style: normal; color: var(--accent); }
.track-wave { position: relative; height: 40px; display: flex; align-items: center; gap: 2px; --p: 0%; }
.track-wave i { flex: 1; height: var(--h); min-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--text) 22%, transparent); transition: background-color .2s; }
.track-wave i.done { background: var(--accent); }
.track.playing .track-wave i { animation: wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--k, 0) * -60ms); }
@keyframes wave { to { scale: 1 .55; } }
.track-seek { position: absolute; inset-inline-start: calc(52px + 52px + 3rem); inset-inline-end: 6rem; opacity: 0; height: 40px; cursor: pointer; }
.track-time { font: 500 .8rem var(--font-mono); color: var(--muted); min-width: 3.2em; text-align: end; }
.track-link { color: var(--muted); }
.track-link:hover { color: var(--accent); }
@media (max-width: 760px) {
  .track { grid-template-columns: auto minmax(0, 1fr) auto; }
  .track-cover, .track-link { display: none; }
  .track-wave { grid-column: 1 / -1; order: 5; }
  .track-seek { inset-inline: .8rem; bottom: .8rem; top: auto; }
}

/* ───────────────────────── النص المتحرك ───────────────────────── */
.marquee { overflow: hidden; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-block: 1px solid var(--line); }
.mq-track { display: flex; width: max-content; animation: marquee var(--dur, 30s) linear infinite; }
.speed-slow { --dur: 55s; } .speed-fast { --dur: 16s; }
.mq-set { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); padding-inline-end: clamp(1.5rem, 3vw, 3rem); }
.mq-set span { font: 800 clamp(2.6rem, 8vw, 7.5rem)/1 var(--font-display); white-space: nowrap; letter-spacing: -.03em; }
.mq-set i { font-style: normal; color: var(--accent); font-size: clamp(1.4rem, 3vw, 2.6rem); }
.marquee.outline .mq-set span:nth-child(4n+3) { color: transparent; -webkit-text-stroke: 1.5px var(--text); }

/* ───────────────────────── الدعوة ───────────────────────── */
.cta { position: relative; overflow: clip; border-radius: calc(var(--radius) * 1.6); padding: clamp(3rem, 8vw, 7rem) clamp(1.5rem, 6vw, 6rem); background: var(--accent); color: var(--on-accent); --muted: color-mix(in srgb, var(--on-accent) 72%, transparent); isolation: isolate; }
.cta-bg { position: absolute; inset: 0; z-index: -1; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta:has(.cta-bg) { color: #fff; --muted: rgba(255, 255, 255, .8); }
.cta-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .25)); }
.cta-inner { max-width: 760px; }
.cta .eyebrow { color: inherit; opacity: .8; }
.cta .eyebrow::before { background: currentColor; }
.cta .lead { color: var(--muted); margin-top: 1.2rem; }
.cta .btn-primary { background: var(--on-accent); color: var(--accent); }
.cta:has(.cta-bg) .btn-primary { background: var(--accent); color: var(--on-accent); }
.cta::before { content: ""; position: absolute; width: 60vmax; aspect-ratio: 1; inset-inline-end: -20vmax; top: -30vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 60%); z-index: -1; }

/* ───────────────────────── الفروع ───────────────────────── */
.branches-tabs { display: grid; gap: 1.5rem; }
.tabs-list { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; }
.tabs-list button { display: grid; text-align: start; gap: .1rem; padding: .9rem 1.3rem; border-radius: 14px; border: 1px solid var(--line); min-width: 180px; transition: all .25s; }
.tabs-list button small { color: var(--muted); font-size: .8rem; }
.tabs-list button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs-list button[aria-selected="true"] small { color: inherit; opacity: .7; }
.branch-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.5rem; animation: fadeUp .6s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; translate: 0 14px; } }
.branch-info { padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 1.3rem; align-content: start; }
.branch-info h3 { font-size: 1.5rem; }
.br-details { display: grid; gap: 1rem; margin: 0; }
.br-details dt { font: 500 .72rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.br-details dd { margin: 0; }
.br-details dd a:hover { color: var(--accent); }
.br-details small { color: var(--muted); }
.br-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.map { border-radius: var(--radius); overflow: clip; min-height: 380px; background: var(--surface); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }
[data-theme="noir"] .map iframe, [data-theme="neon"] .map iframe, [data-theme="sunset"] .map iframe { filter: invert(.9) hue-rotate(180deg) saturate(.6) contrast(.9); }
.branch-cards { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.branch-card { display: grid; gap: 0; border-radius: var(--radius); overflow: clip; border: 1px solid var(--line); background: var(--surface); }
.branch-card .map { border-radius: 0; border: 0; min-height: 240px; }
.branch-card .map iframe { min-height: 240px; }
.branch-card .branch-info { border: 0; border-radius: 0; }
@media (max-width: 860px) { .branch-panel { grid-template-columns: 1fr; } }

/* ───────────────────────── نموذج التواصل ───────────────────────── */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1.2rem; }
.contact-form .wide, .contact-form .chips, .contact-form .form-msg, .contact-form button { grid-column: 1 / -1; }
.contact-form button { justify-self: start; }
.fl { position: relative; }
.fl input, .fl textarea {
  width: 100%; padding: 1.5rem 0 .6rem; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; font-size: 1.05rem;
  border-radius: 0; transition: border-color .3s; resize: vertical;
}
.fl input:focus, .fl textarea:focus { outline: none; border-color: var(--accent); }
.fl label { position: absolute; inset-inline-start: 0; top: 1.4rem; color: var(--muted); pointer-events: none; transition: top .25s var(--ease-out), font-size .25s, color .25s; }
.fl input:focus + label, .fl input:not(:placeholder-shown) + label, .fl textarea:focus + label, .fl textarea:not(:placeholder-shown) + label { top: 0; font-size: .78rem; color: var(--accent); }
.fl.invalid input, .fl.invalid textarea { border-color: #ff4d6d; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { color: var(--muted); font-size: .85rem; margin-bottom: .6rem; padding: 0; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; transition: all .2s; font-size: .92rem; }
.chips input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-msg { margin: 0; padding: 1rem 1.2rem; border-radius: 12px; }
.form-msg.ok { background: color-mix(in srgb, #2bd67b 16%, transparent); border: 1px solid color-mix(in srgb, #2bd67b 40%, transparent); }
.form-msg.err { background: color-mix(in srgb, #ff4d6d 14%, transparent); border: 1px solid color-mix(in srgb, #ff4d6d 40%, transparent); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; } .contact-form { grid-template-columns: 1fr; } }

.custom-html iframe { width: 100%; border: 0; border-radius: var(--radius); }

/* ───────────────────────── قوالب الصفحات ───────────────────────── */
.page-title { padding-block: clamp(5rem, 12vw, 9rem) clamp(1rem, 3vw, 2rem); }
.tpl-immersive .page-title { padding-top: calc(var(--header-h) + clamp(4rem, 10vw, 8rem)); }
.page-title .lead { margin-top: 1.4rem; }
.page-title + .blk { padding-top: clamp(2rem, 5vw, 4rem); }
.notfound { min-height: 70vh; display: grid; align-content: center; }
.with-aside { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 4rem; padding-inline-end: 0; }
.aside { position: relative; }
.aside ol { position: sticky; top: calc(var(--header-h) + 2.5rem); list-style: none; margin: 0; padding: var(--space) 0 0; display: grid; gap: .2rem; }
.aside a { display: flex; gap: .8rem; padding: .5rem 0; color: var(--muted); font: 500 .95rem var(--font-display); transition: color .2s, padding .3s var(--ease-out); }
.aside a small { font: 500 .72rem var(--font-mono); padding-top: .2rem; }
.aside a:hover, .aside a.active { color: var(--text); }
.aside a.active { padding-inline-start: .5rem; }
.aside a.active small { color: var(--accent); }
.aside-main .wrap { padding-inline: 0 var(--gutter); }
.aside-main .blk-hero .wrap { padding-inline: var(--gutter); }
@media (max-width: 1000px) { .with-aside { grid-template-columns: 1fr; gap: 0; padding-inline: 0; } .aside { display: none; } .aside-main .wrap { padding-inline: var(--gutter); } }

/* ───────────────────────── صفحة المشروع ───────────────────────── */
.project-hero { position: relative; min-height: 88svh; display: grid; align-items: end; color: #fff; isolation: isolate; overflow: clip; }
.project-hero-media { position: absolute; inset: 0; z-index: -1; }
.project-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.project-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .15)); }
.project-hero-text { padding-block: calc(var(--header-h) + 4rem) 3rem; }
.project-hero .eyebrow { color: #fff; opacity: .85; }
.project-hero .lead { color: rgba(255, 255, 255, .82); margin-top: 1.2rem; }
[data-theme="paper"] .project-hero .display { color: var(--text); }
[data-theme="paper"] .project-hero .lead { color: var(--muted); }
[data-theme="paper"] .project-hero .eyebrow { color: var(--muted); }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 2.5rem; border-bottom: 1px solid var(--line); }
.project-meta dl { display: flex; flex-wrap: wrap; gap: 1.5rem 3.5rem; margin: 0; }
.project-meta dt { font: 500 .72rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.project-meta dd { margin: 0; display: flex; align-items: center; gap: .6rem; font: 500 1.05rem var(--font-display); }
.client-logo { height: 26px; width: auto; }
.tags { flex-wrap: wrap; gap: .4rem !important; }
.tags span { padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.project-links { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.project-feature { padding-block: 3rem 0; }
.project-feature .embed { border-radius: var(--radius); }
.prose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 4rem; padding-block: clamp(3rem, 7vw, 6rem); }
.prose-wrap .prose { font-size: 1.12rem; }
.credits { display: grid; gap: 1rem; align-content: start; padding-inline-start: 2rem; border-inline-start: 1px solid var(--line); }
.credits div { display: grid; }
.credits span { font: 500 .72rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.8rem, 2vw, 1.6rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.pg-item { margin: 0; }
.pg-item.wide { grid-column: 1 / -1; }
.pg-item img, .pg-item video { width: 100%; border-radius: var(--radius); }
.pg-item:not(.wide) img { aspect-ratio: 4/3; object-fit: cover; }
.pg-item .zoom, .pg-item > a { display: block; width: 100%; border-radius: var(--radius); overflow: clip; }
.pg-item .embed { border-radius: var(--radius); }
.next-project { border-top: 1px solid var(--line); }
.next-project a { display: grid; gap: .5rem; padding-block: clamp(4rem, 10vw, 8rem); position: relative; }
.next-project small { font: 500 .78rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.next-project .display { transition: color .3s; }
.next-project a:hover .display { color: var(--accent); }
.np-img { position: absolute; inset-inline-end: var(--gutter); top: 50%; width: clamp(160px, 22vw, 320px); aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; translate: 0 -50%; rotate: -4deg; opacity: 0; scale: .8; transition: opacity .4s, scale .6s var(--ease-out), rotate .6s var(--ease-out); }
.next-project a:hover .np-img { opacity: 1; scale: 1; rotate: 3deg; }
.np-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .prose-wrap { grid-template-columns: 1fr; } .credits { padding: 1.5rem 0 0; border: 0; border-top: 1px solid var(--line); } .project-gallery { grid-template-columns: 1fr; } }

/* ───────────────────────── التذييل ───────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(4rem, 9vw, 8rem); background: var(--bg); position: relative; overflow: clip; }
.footer-big { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--line); font: 800 clamp(2.4rem, 7.5vw, 8rem)/1.05 var(--font-display); letter-spacing: -.035em; }
:lang(ar) .footer-big { letter-spacing: 0; line-height: 1.2; }
.footer-big i { font-style: normal; display: grid; place-items: center; flex-shrink: 0; width: clamp(64px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .4em; transition: rotate .6s var(--ease-out), scale .4s var(--ease-out); }
.footer-big:hover i { rotate: -45deg; scale: 1.06; }
[dir="rtl"] .footer-big:hover i { rotate: 45deg; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding-block: 3.5rem; }
.footer-about p { margin-top: 1.2rem; color: var(--muted); max-width: 36ch; }
.footer-col h3 { font: 500 .74rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-col .socials { display: grid; color: inherit; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.6rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.footer-bottom-links a:hover { color: var(--text); }
.to-top { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); transition: border-color .2s, translate .3s var(--ease-out); }
.to-top:hover { border-color: var(--text); translate: 0 -3px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ───────────────────────── المكبّر والمؤشر ───────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; background: rgba(5, 5, 8, .94); backdrop-filter: blur(10px); color: #fff; animation: fadeIn .3s; }
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 1rem; grid-column: 2; }
.lightbox img { max-height: 84vh; width: auto; border-radius: 10px; animation: zoomIn .45s var(--ease-out); }
@keyframes zoomIn { from { scale: .92; opacity: 0; } }
.lightbox figcaption { color: rgba(255, 255, 255, .7); font-size: .9rem; }
.lb-close { position: absolute; top: 1rem; inset-inline-end: 1rem; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 1.1rem; }
.lb-prev, .lb-next { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 1.6rem; justify-self: center; }
.lb-prev { grid-column: 1; grid-row: 1; } .lb-next { grid-column: 3; grid-row: 1; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .2); }

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; mix-blend-mode: difference; }
  .cursor span { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), opacity .3s; display: grid; place-items: center; font: 600 .7rem var(--font-display); color: #000; white-space: nowrap; overflow: hidden; }
  .cursor.big span { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
  .cursor.big { mix-blend-mode: normal; }
  .cursor.big span { background: var(--accent); color: var(--on-accent); }
  .cursor.hide span { opacity: 0; }
}

/* ───────────────────────── شاشة الدخول ───────────────────────── */
.intro-page { background: #0a0a0d; color: #f4f1ec; min-height: 100svh; overflow: hidden; }
.intro-stage { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto auto 1fr; }
.intro-canvas { position: fixed; inset: 0; z-index: 0; }
.intro-grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0% { translate: 0 0; } 20% { translate: -4% 3%; } 40% { translate: 3% -2%; } 60% { translate: -2% -4%; } 80% { translate: 4% 2%; } }
.intro-brand { position: relative; z-index: 2; text-align: center; padding: clamp(1.5rem, 5vh, 3rem) 1rem 0; min-height: 26svh; display: grid; align-content: end; justify-items: center; gap: .6rem; }
.intro-word { margin: 0; font: 800 clamp(2.6rem, 9vw, 7rem)/1 var(--font-display); letter-spacing: -.04em; }
.intro-tagline .tw { display: inline-flex; white-space: nowrap; }
.intro-tagline { gap: 0 .9em; margin: 0; font: 500 clamp(.66rem, 1.1vw, .8rem) var(--font-mono); letter-spacing: .3em; text-transform: uppercase; color: rgba(244, 241, 236, .6); display: flex; flex-wrap: wrap; justify-content: center; }
.intro-question { position: relative; z-index: 2; text-align: center; margin: clamp(1rem, 3vh, 2rem) 0; color: rgba(244, 241, 236, .55); font: 400 1rem var(--font-body); }
.choices { position: relative; z-index: 3; display: flex; gap: clamp(.6rem, 1.4vw, 1rem); padding: 0 clamp(.75rem, 2vw, 1.5rem) clamp(.75rem, 2vw, 1.5rem); min-height: 52svh; }
.choice {
  position: relative; flex: 1 1 0; display: grid; grid-template-rows: auto 1fr; padding: clamp(1.4rem, 3vw, 2.6rem); border-radius: 22px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .1); background: #111116;
  transition: flex-grow .8s var(--ease-out), border-color .4s, opacity .5s, filter .5s;
}
.choices:hover .choice:not(:hover), .choices:focus-within .choice:not(:focus-visible):not(:hover) { opacity: .55; filter: saturate(.4); }
.choice:hover, .choice:focus-visible { flex-grow: 1.55; border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.choice-bg { position: absolute; inset: 0; z-index: -1; }
.choice-bg img, .choice-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.4s var(--ease-out), opacity .6s; }
.choice-bg img { opacity: .55; }
.choice:hover .choice-bg img { scale: 1.08; opacity: .75; }
.choice-bg video { opacity: 0; }
.choice:hover .choice-bg video { opacity: 1; }
.choice-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 8, 10, .92) 10%, rgba(8, 8, 10, .25) 70%, rgba(8, 8, 10, .45)); }
.choice-fx { position: absolute; inset: 0; z-index: 1; opacity: .5; pointer-events: none; }
.choice-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: .85; transition: opacity .6s; }
.choice:hover .choice-canvas { opacity: 1; }
.choice-bg:has(.choice-canvas) img { opacity: .3; }
.choice-noir .choice-fx { background: radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%), radial-gradient(35% 40% at 75% 70%, rgba(255, 46, 126, .35), transparent 70%); animation: blob 12s ease-in-out infinite alternate; filter: blur(30px); }
@keyframes blob { to { transform: translate(6%, -4%) scale(1.15) rotate(8deg); } }
.choice-neon .choice-fx, .choice-paper .choice-fx, .choice-sunset .choice-fx {
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); animation: gridmove 6s linear infinite;
}
@keyframes gridmove { to { background-position: 0 44px, 44px 0; } }
.choice-num { font: 500 .8rem var(--font-mono); color: var(--accent); letter-spacing: .1em; }
.choice-body { align-self: end; display: grid; gap: .6rem; justify-items: start; }
.choice-tag { font: 500 .72rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 241, 236, .62); }
.choice-name { font: 800 clamp(2rem, 4.6vw, 4.6rem)/1 var(--font-display); letter-spacing: -.035em; }
.choice-desc { max-width: 40ch; color: rgba(244, 241, 236, .7); font-size: .98rem; line-height: 1.6; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .7s var(--ease-out), opacity .5s; }
.choice:hover .choice-desc, .choice:focus-visible .choice-desc { max-height: 6em; opacity: 1; }
.choice-cta { display: inline-flex; align-items: center; gap: .7rem; margin-top: .6rem; padding: .7rem 1.3rem; border-radius: 999px; background: var(--accent); color: #0a0a0d; font: 600 .92rem var(--font-display); transition: gap .35s var(--ease-out); }
.choice-cta i { font-style: normal; }
.choice:hover .choice-cta { gap: 1.1rem; }
.choice.leaving { z-index: 10; }
.intro-skip { position: fixed; z-index: 5; bottom: 1.2rem; inset-inline-end: 1.2rem; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); font: 500 .8rem var(--font-mono); color: rgba(255, 255, 255, .75); letter-spacing: .08em; text-transform: uppercase; transition: opacity .4s, background-color .2s; }
.intro-skip:hover { background: rgba(255, 255, 255, .08); }

/* مراحل الحركة: لا تُخفى الأشياء إلا إذا عمل السكربت */
.js-intro .intro-word-fallback { opacity: 0; }
.js-intro body:not([data-state]) .choice, .js-intro [data-state="boot"] .choice, .js-intro [data-state="form"] .choice, .js-intro [data-state="brand"] .choice { opacity: 0; translate: 0 60px; pointer-events: none; }
.js-intro .choice { transition: flex-grow .8s var(--ease-out), border-color .4s, opacity .9s var(--ease) calc(var(--i) * 140ms + 100ms), translate 1.1s var(--ease-out) calc(var(--i) * 140ms + 100ms), filter .5s; }
.js-intro .intro-tagline span { opacity: 0; translate: 0 8px; transition: opacity .5s, translate .6s var(--ease-out); transition-delay: calc(var(--i) * 18ms); }
.js-intro [data-state="brand"] .intro-tagline span, .js-intro [data-state="choose"] .intro-tagline span, .js-intro [data-state="leave"] .intro-tagline span { opacity: 1; translate: 0 0; }
.js-intro .intro-question { opacity: 0; transition: opacity .8s .5s; }
.js-intro [data-state="choose"] .intro-question { opacity: 1; }
.js-intro [data-state="choose"] .intro-skip, .js-intro [data-state="leave"] .intro-skip { opacity: 0; pointer-events: none; }
.js-intro .intro-brand { min-height: 22svh; }
[data-state="leave"] .choice:not(.leaving) { opacity: 0 !important; translate: 0 30px; transition-delay: 0s !important; }
[data-state="leave"] .intro-brand, [data-state="leave"] .intro-question { opacity: 0; transition: opacity .4s; }
.choice.leaving { flex-grow: 8; transition: flex-grow .7s var(--ease) !important; }
.choice.leaving .choice-body { opacity: 0; transition: opacity .3s; }

@media (max-width: 760px) {
  .intro-page { overflow-y: auto; }
  .choices { flex-direction: column; min-height: 0; }
  .choice { min-height: 34svh; }
  .choice-desc { max-height: none; opacity: 1; }
  .choices:hover .choice:not(:hover) { opacity: 1; filter: none; }
  .choice.leaving { flex-grow: 1; }
}

/* ───────────────────────── الانتقال بين الصفحات والحركة المخففة ───────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: .45s var(--ease) both vt-out; }
  ::view-transition-new(root) { animation: .6s var(--ease-out) both vt-in; }
  @keyframes vt-out { to { opacity: 0; scale: .985; } }
  @keyframes vt-in { from { opacity: 0; translate: 0 18px; } }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal="clip"], .js [data-reveal="scale"] { opacity: 1; translate: none; scale: none; clip-path: none; transition: none; }
  .js [data-split] .split-w > span { translate: none; transition: none; }
  .lm-track, .mq-track { animation-duration: 200s; }
  .intro-grain, .choice-fx, .embed-play, .scroll-cue i::after { animation: none; }
  .track.playing .track-wave i { animation: none; }
}
