/* =========================================================
   استوديو التصميم — واجهة الموقع (الإصدار 3)
   1) المتغيرات  2) الأساس  3) عناصر عامة  4) الهيدر
   5) الواجهة  6) الأقسام  7) الصفحات الداخلية  8) التذييل
   9) الحركة عند التمرير  10) الجوال  11) تقليل الحركة
   ========================================================= */

/* ---------- 1) المتغيرات ---------- */
:root {
  --bg: #161716;
  --bg-2: #1d1e1c;
  --bg-deep: #0c0d0c;
  --text: #f4f3ee;
  --muted: #9d9c94;
  --gold: #b3ab8a;
  --gold-ink: #161716;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --wrap: min(1280px, 88vw);
  --header-h: 96px;
  --font-ar: Almarai, Montserrat, Tahoma, sans-serif;
  --font-en: Montserrat, Almarai, Arial, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #e9e6dc;
  --text: #1b1c1a;
  --muted: #6c6b63;
  --gold: #8d8460;
  --gold-ink: #fff;
  --line: rgba(0, 0, 0, .09);
  --line-strong: rgba(0, 0, 0, .2);
  color-scheme: light;
}

/* ---------- 2) الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color .5s, color .5s;
}
[dir="ltr"] body { font-family: var(--font-en); line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.wrap { width: var(--wrap); margin-inline: auto; position: relative; }
.center { text-align: center; margin-top: 60px; }
.empty { color: var(--muted); padding: 40px 0; }
.ico { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .ico-arrow, [dir="rtl"] .ico-prev, [dir="rtl"] .ico-next { transform: scaleX(-1); }

.skip-link {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 500;
  background: var(--gold); color: var(--gold-ink); padding: 10px 18px; font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- 3) عناصر عامة ---------- */

/* شاشة التحميل */
.loader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg-deep); color: #f4f3ee;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: transform .9s var(--ease-io), visibility 0s .9s;
  animation: loader-failsafe 0s linear 6s forwards; /* لو تعطل الجافاسكربت ما تعلق الشاشة */
}
html:not(.js) .loader { display: none; }
.loader.is-done { transform: translateY(-100%); visibility: hidden; }
.loader-word { display: flex; gap: .5em; direction: ltr; font: 600 clamp(18px, 2.4vw, 28px) var(--font-en); letter-spacing: .1em; perspective: 600px; }
.loader-word span { animation: loader-letter 2.4s ease infinite; animation-delay: calc(var(--i) * .12s); opacity: 0; }
.loader-bar { width: 140px; height: 1px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; animation: loader-bar 1.4s var(--ease-io) infinite; }
@keyframes loader-letter { 0%, 80%, 100% { opacity: 0; transform: rotateY(-90deg); } 25%, 60% { opacity: 1; transform: rotateY(0); } }
@keyframes loader-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes loader-failsafe { to { visibility: hidden; transform: translateY(-100%); } }

/* الخطوط العمودية مع ومضة الضوء النازلة */
.grid-lines {
  position: fixed; inset-block: 0; left: 50%; width: var(--wrap); transform: translateX(-50%);
  display: flex; justify-content: space-between; pointer-events: none; z-index: 1;
}
.grid-lines i { position: relative; width: 1px; background: var(--line); overflow: hidden; }
.grid-lines i::after {
  content: ""; position: absolute; top: 0; left: 0; width: 1px; height: 110px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  transform: translateY(-120px);
  animation: line-fall 11s linear infinite;
}
.grid-lines i:nth-child(2)::after { animation-delay: 3.5s; }
.grid-lines i:nth-child(3)::after { animation-delay: 7s; }
.grid-lines i:nth-child(4)::after { animation-delay: 1.5s; }
.grid-lines i:nth-child(5)::after { animation-delay: 5.5s; }
.grid-lines i:nth-child(6)::after { animation-delay: 9s; }
@keyframes line-fall { to { transform: translateY(100vh); } }
main, .footer { position: relative; z-index: 2; }

/* المؤشر المخصص (يظهر فقط مع الماوس) */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 450; pointer-events: none; border-radius: 50%; opacity: 0; display: none; }
.has-cursor .cursor-dot, .has-cursor .cursor-ring { display: block; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #fff; mix-blend-mode: difference; transition: opacity .3s; }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid var(--gold); display: none; place-items: center;
  transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s, border-color .35s;
}
.has-cursor .cursor-ring { display: grid; }
.cursor-ring span { font-size: 12px; font-weight: 700; color: var(--gold-ink); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-ring.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(179, 171, 138, .14); }
.cursor-ring.is-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--gold); border-color: var(--gold); }
.cursor-ring.is-label span { opacity: 1; }
.cursor-ring.is-label ~ .cursor-dot, .cursor-hide-dot .cursor-dot { opacity: 0; }

/* عناوين صغيرة وأزرار */
.eyebrow { display: block; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin-bottom: 22px; }
[dir="rtl"] .eyebrow { letter-spacing: .02em; font-size: 13px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 40px; background: var(--gold); color: var(--gold-ink);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; isolation: isolate;
  transition: transform .4s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(135deg, var(--gold) 0 1px, transparent 1px 6px);
  transform: translate(8px, 8px); transition: transform .4s var(--ease);
}
.btn:hover, .btn:focus-visible { transform: translate(4px, 4px); }
.btn:hover::after, .btn:focus-visible::after { transform: translate(0, 0); }

.line-link { display: inline-flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 700; }
.line-link i {
  position: relative; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; transition: background-color .4s, border-color .4s, color .4s;
}
.line-link .ico { width: 18px; height: 18px; transition: translate .4s var(--ease); }
a.line-link:hover i, a:hover > .project-info .line-link i, .package-card:hover .line-link i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
[dir="ltr"] a.line-link:hover .ico, [dir="ltr"] a:hover .line-link .ico { translate: 4px 0; }
[dir="rtl"] a.line-link:hover .ico, [dir="rtl"] a:hover .line-link .ico { translate: -4px 0; }

/* كلمة خلفية عملاقة */
.bg-word {
  position: absolute; top: 0; inset-inline-start: -4vw; z-index: -1;
  font: 800 clamp(90px, 18vw, 280px)/1 var(--font-en); white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
  opacity: .55; pointer-events: none; user-select: none; will-change: transform;
}
[dir="rtl"] .bg-word { font-family: var(--font-ar); line-height: 1.3; -webkit-text-stroke: 0; color: var(--line); opacity: 1; }

/* ---------- 4) الهيدر ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding-inline: max(6vw, calc((100vw - 1280px) / 2));
  transition: transform .5s var(--ease), height .4s var(--ease), background-color .4s, color .4s;
}
.site-header::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--line); }
.site-header.is-solid { height: 72px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.is-hidden { transform: translateY(-100%); }
/* فوق صورة الواجهة النص دائماً فاتح مهما كان الوضع */
.page-home .site-header:not(.is-solid), .page-project .site-header:not(.is-solid) { --text: #f4f3ee; --line: rgba(255, 255, 255, .12); --line-strong: rgba(255, 255, 255, .3); color: var(--text); }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; color: var(--gold); transition: transform .8s var(--ease); }
.brand:hover .brand-mark { transform: rotate(90deg); }

.main-nav { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: 13px; font-weight: 700; }
.main-nav a { position: relative; padding: 8px 0; overflow: hidden; display: block; }
.main-nav a span { display: block; position: relative; transition: transform .45s var(--ease); }
.main-nav a span::after { content: attr(data-text); position: absolute; top: 100%; inset-inline-start: 0; color: var(--gold); padding-top: 8px; }
.main-nav a:hover span { transform: translateY(calc(-100% - 8px)); }
.main-nav a[aria-current] { color: var(--gold); }

.header-tools { display: flex; align-items: center; gap: 18px; }
.lang-switch { font: 700 12px var(--font-en); letter-spacing: .08em; padding: 6px 2px; border-bottom: 1px solid var(--gold); }
[lang="ar"].lang-switch { font-family: var(--font-ar); letter-spacing: 0; font-size: 13px; }
.theme-toggle { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: border-color .3s, transform .5s var(--ease); }
.theme-toggle:hover { border-color: var(--gold); transform: rotate(25deg); }
.theme-toggle .ico { grid-area: 1 / 1; width: 18px; height: 18px; transition: opacity .3s, transform .5s var(--ease); }
.theme-toggle .ico-sun, [data-theme="light"] .theme-toggle .ico-moon { opacity: 0; transform: scale(.4) rotate(-90deg); }
[data-theme="light"] .theme-toggle .ico-sun { opacity: 1; transform: none; }

.menu-toggle { display: block; width: 40px; height: 40px; position: relative; }
.search-toggle { width: 40px; height: 40px; display: grid; place-items: center; transition: color .3s, transform .4s var(--ease); }
.search-toggle:hover { color: var(--gold); transform: scale(1.12); }
.menu-toggle i { position: absolute; inset-inline: 9px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), opacity .3s, top .4s var(--ease); }
.menu-toggle i:nth-child(1) { top: 13px; }
.menu-toggle i:nth-child(2) { top: 19px; inset-inline-start: 15px; }
.menu-toggle i:nth-child(3) { top: 25px; }
.menu-open .menu-toggle i:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-open .menu-toggle i:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle i:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg-deep); color: #f4f3ee;
  display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 110px 8vw 40px;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io); overflow-y: auto;
}
.menu-open .mobile-menu { clip-path: inset(0); }
.mobile-menu nav { display: grid; gap: 6px; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 16px; font-size: clamp(28px, 8vw, 44px); font-weight: 800; line-height: 1.5;
  opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s var(--ease), color .3s;
}
.mobile-menu nav a small { font: 500 12px var(--font-en); color: var(--gold); }
.mobile-menu nav a[aria-current] { color: var(--gold); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * 70ms); }
.mobile-menu-foot { display: grid; gap: 4px; color: #9d9c94; font-size: 14px; }
.menu-open .site-header { --text: #f4f3ee; color: #f4f3ee; background: transparent; backdrop-filter: none; transform: none; }
.menu-open { overflow: hidden; }

/* ---------- 5) الواجهة ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; max-height: 1100px; overflow: hidden; }
.hero-media { position: absolute; inset-block: 0 88px; inset-inline: 0 4vw; background: var(--bg-2); overflow: hidden; }
.hero-media::after { content: ""; position: absolute; inset: 0; z-index: 4; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 30%, transparent 70%, rgba(0, 0, 0, .25)); pointer-events: none; }
.hero-slide { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); z-index: 1; }
[dir="ltr"] .hero-slide { clip-path: inset(0 100% 0 0); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); }
.hero-slide.is-prev { clip-path: inset(0); z-index: 2; }
.hero-slide.is-active { clip-path: inset(0); z-index: 3; }
.js .hero-slide.is-active { transition: clip-path 1.4s var(--ease-io); }
.js .hero-slide.is-active img { animation: ken-burns 8s linear forwards; }
@keyframes ken-burns { from { transform: scale(1.18); } to { transform: scale(1.02); } }
.hero-hatch { position: absolute; z-index: 5; inset-inline-start: 6%; bottom: 0; width: 150px; height: 110px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 8px); }

.hero-panel {
  position: absolute; z-index: 6; inset-inline-end: 0; top: 50%; transform: translateY(-50%);
  width: min(440px, 36vw); min-height: 400px; background: var(--bg);
  padding: clamp(30px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 34px;
  transition: background-color .5s;
}
.hero-panel > .line-link { align-self: flex-start; }
.hero-captions, .hero-panel { --stagger: 90ms; }
.hero-panel { display: grid; grid-template-columns: 100%; align-content: center; }
.hero-caption { grid-area: 1 / 1; visibility: hidden; transition: visibility 0s .6s; }
.hero-caption.is-active { visibility: visible; transition-delay: 0s; }
.hero-caption > * { display: block; overflow: hidden; }
.hero-caption > * > span { display: block; transform: translateY(110%); transition: transform .6s var(--ease-io); }
.hero-caption.is-active > * > span { transform: none; transition: transform 1s var(--ease) .45s; }
.hero-caption.is-active > :nth-child(2) > span { transition-delay: .55s; }
.hero-caption.is-active > :nth-child(3) > span { transition-delay: .65s; }
.hero-caption .eyebrow { margin-bottom: 14px; }
.hero-title, .hero-caption h1 { font-size: clamp(28px, 3.3vw, 50px); line-height: 1.4; font-weight: 800; margin-bottom: 12px; padding-block: .08em; }
[dir="ltr"] .hero-title { line-height: 1.2; text-transform: uppercase; font-weight: 700; font-size: clamp(24px, 2.6vw, 40px); }
.hero-caption p { color: var(--muted); font-size: 14px; }
.hero-panel > .line-link { grid-row: 2; }

.hero-ui { position: absolute; bottom: 0; inset-inline: 0 4vw; height: 88px; display: flex; align-items: center; justify-content: space-between; padding-inline: max(6vw, calc((100vw - 1280px) / 2)) 30px; z-index: 6; }
.hero-count { display: flex; align-items: center; gap: 12px; font: 500 13px var(--font-en); color: var(--muted); direction: ltr; }
.hero-count b { color: var(--text); font-size: 20px; font-weight: 600; min-width: 1.4em; }
.hero-count i { width: 40px; height: 1px; background: var(--line-strong); }
.hero-dots { display: flex; gap: 10px; }
.hero-dots button { width: 44px; height: 30px; display: grid; align-items: center; }
.hero-dots button i { display: block; height: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero-dots button i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .hero-dots button i::after { transform-origin: right; }
.hero-dots button.is-active i::after { transform: scaleX(1); }
.js .hero.is-playing .hero-dots button.is-active i::after { animation: dot-fill var(--slide-dur, 6s) linear forwards; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-arrows { display: flex; gap: 10px; }
.hero-arrows button { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s, border-color .3s; }
.hero-arrows button:hover { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.hero-scroll { position: absolute; z-index: 6; inset-inline-end: calc(2vw - 7px); bottom: 110px; writing-mode: vertical-rl; font: 600 10px var(--font-en); letter-spacing: .25em; color: var(--muted); display: flex; align-items: center; gap: 14px; }
[dir="rtl"] .hero-scroll { font-family: var(--font-ar); letter-spacing: 0; font-size: 12px; }
.hero-scroll i { width: 1px; height: 60px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero-scroll i::after { content: ""; position: absolute; inset: 0; background: var(--gold); animation: scroll-hint 2.2s var(--ease-io) infinite; }
@keyframes scroll-hint { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- 6) الأقسام ---------- */
.section { padding-block: clamp(80px, 11vw, 160px); }
.section-tight { padding-bottom: clamp(80px, 10vw, 140px); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section-head h1, .section-head h2, .about-copy h2, .footer-cta h2 { font-size: clamp(30px, 4.2vw, 58px); line-height: 1.35; font-weight: 800; }
[dir="ltr"] .section-head h1, [dir="ltr"] .section-head h2, [dir="ltr"] .about-copy h2, [dir="ltr"] .footer-cta h2 { line-height: 1.15; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.section-head p { color: var(--muted); margin-top: 18px; max-width: 560px; }

/* الخدمات */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.service { position: relative; padding: 44px 34px 50px; border-inline-end: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.service:last-child { border-inline-end: 0; }
.service::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg-2); transform: translateY(101%); transition: transform .6s var(--ease-io); }
.service:hover::before { transform: none; }
.service-num { font: 500 13px var(--font-en); color: var(--gold); }
.service-icon { margin: 26px 0 22px; color: var(--gold); transition: transform .6s var(--ease); }
.service-icon .ico { width: 44px; height: 44px; stroke-width: 1; }
.service:hover .service-icon { transform: translateY(-6px); }
.service h3 { font-size: 21px; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 14.5px; max-width: 320px; }

/* عن الاستوديو */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.about-media { position: relative; }
.about-image { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.about-image img, .about-image canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* تبديل الصورة عند المرور: الأساس تلاشٍ بسيط، ومع WebGL يصير تموّج (site.js) */
.about-image[data-swap] { cursor: pointer; }
.about-image .about-img-b { opacity: 0; transition: opacity .9s var(--ease), transform 1.4s var(--ease); }
html:not(.js) .about-image:hover .about-img-b, .about-image.is-swapped .about-img-b { opacity: 1; }
.about-image.has-gl > img { visibility: hidden; }
.hatch { position: absolute; z-index: 2; inset-inline-end: -28px; bottom: -28px; width: 45%; aspect-ratio: 1; background: repeating-linear-gradient(135deg, var(--gold) 0 1px, transparent 1px 8px); opacity: .6; pointer-events: none; }
.about-copy p { color: var(--muted); margin-top: 22px; max-width: 520px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 34px 0 44px; font-size: 14px; font-weight: 700; }
.about-features li { display: flex; align-items: center; gap: 12px; }
.about-features li::before { content: ""; width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); flex: none; }
.lead { font-size: clamp(17px, 1.6vw, 22px); line-height: 2.1; color: var(--text) !important; }
[dir="ltr"] .lead { line-height: 1.8; }

/* الأرقام */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.stat { text-align: center; padding: 56px 10px; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat strong { display: block; font: 600 clamp(40px, 5vw, 68px)/1.1 var(--font-en); font-variant-numeric: tabular-nums; }
.stat strong::after { content: "+"; color: var(--gold); font-size: .5em; vertical-align: top; margin-inline-start: 4px; }
.stat span { color: var(--muted); font-size: 13px; }

/* المشاريع */
.filter { display: flex; flex-wrap: wrap; gap: 6px 30px; margin-bottom: 40px; }
.filter button { position: relative; padding: 8px 0; font-size: 14px; font-weight: 700; color: var(--muted); transition: color .3s; }
.filter button::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .45s var(--ease-io); }
.filter button:hover, .filter button.is-active { color: var(--text); }
.filter button.is-active::after { transform: scaleX(1); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 38px); }
.project-card { position: relative; display: block; overflow: hidden; background: var(--bg-2); transition: opacity .35s, transform .5s var(--ease); }
.project-card.is-wide { grid-column: 1 / -1; }
.project-card.is-out { opacity: 0 !important; transform: scale(.97) !important; }
/* نسبة ثابتة لكل بطاقة: المساحة محجوزة قبل تحميل الصورة فلا يحصل تراكب */
.project-media { aspect-ratio: 4 / 3; overflow: hidden; }
.project-card.is-wide .project-media { aspect-ratio: 16 / 8; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.project-card:hover .project-media img, .project-card:focus-visible .project-media img { transform: scale(1.07); }
.project-card { perspective: 900px; }
.project-info {
  position: absolute; bottom: 0; inset-inline-start: 0; background: var(--bg); padding: 44px 32px 26px; min-width: min(270px, 80%);
  clip-path: polygon(0 0, 100% 22px, 100% 100%, 0 100%);
  transform: rotateY(-92deg); transform-origin: left center; opacity: 0; backface-visibility: hidden;
  transition: transform .55s var(--ease-io), opacity .25s ease .2s, background-color .5s;
}
[dir="rtl"] .project-info { transform: rotateY(92deg); transform-origin: right center; clip-path: polygon(0 22px, 100% 0, 100% 100%, 0 100%); }
.project-info > * { opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .5s var(--ease); }
/* تظهر البطاقة عند المرور بالمؤشر أو التركيز بلوحة المفاتيح */
.project-card:hover .project-info, .project-card:focus-visible .project-info { transform: none; opacity: 1; transition: transform .6s var(--ease-io), opacity .2s, background-color .5s; }
.project-card:hover .project-info > *, .project-card:focus-visible .project-info > * { opacity: 1; transform: none; transition-delay: calc(.28s + var(--k, 0) * 70ms); }
.project-info > :nth-child(2) { --k: 1; }
.project-info > :nth-child(3) { --k: 2; }
/* شاشات اللمس ما فيها مرور بالمؤشر: البطاقة ظاهرة دائماً */
@media (hover: none) {
  .project-info, [dir="rtl"] .project-info { transform: none; opacity: 1; }
  .project-info > * { opacity: 1; transform: none; }
}
.project-cat { display: block; font-size: 12px; color: var(--gold); font-weight: 700; }
.project-info h3 { font-size: 21px; margin: 4px 0 16px; }
.project-info .line-link { font-size: 12px; }
.project-info .line-link i { width: 38px; height: 38px; }

/* آراء العملاء */
.testimonials { position: relative; background: var(--bg-deep); color: #f4f3ee; padding-block: clamp(90px, 11vw, 150px); text-align: center; overflow: hidden; --muted: #9d9c94; --gold: #b3ab8a; --line-strong: rgba(255, 255, 255, .2); }
.sketch { position: absolute; bottom: 0; width: clamp(180px, 26vw, 400px); color: rgba(255, 255, 255, .16); stroke-width: .8; }
.sketch-a { left: 2vw; }
.sketch-b { right: 2vw; }
.js .sketch path { stroke-dasharray: 3000; stroke-dashoffset: 3000; transition: stroke-dashoffset 4s ease-out .3s; }
.js .testimonials.is-in .sketch path { stroke-dashoffset: 0; }
.quote-mark { display: block; font: 700 110px/0.6 Georgia, serif; color: var(--gold); height: 60px; }
.testimonial-track { display: grid; max-width: 820px; margin-inline: auto; }
.testimonial { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .6s, transform .8s var(--ease), visibility 0s .6s; }
.testimonial.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .25s, .25s, 0s; }
.testimonial blockquote { font-size: clamp(19px, 2.3vw, 30px); line-height: 1.9; font-weight: 700; }
[dir="ltr"] .testimonial blockquote { line-height: 1.6; font-weight: 500; }
.testimonial figcaption { margin-top: 30px; display: grid; gap: 2px; }
.testimonial figcaption b { color: var(--gold); }
.testimonial figcaption span { color: var(--muted); font-size: 13px; }
.testimonial-dots { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }
.testimonial-dots button { width: 28px; height: 28px; display: grid; place-items: center; }
.testimonial-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: background-color .3s, transform .3s; }
.testimonial-dots button.is-active::before { background: var(--gold); transform: scale(1.5); }

/* الفريق */
.team .section-head { margin-inline: auto; text-align: center; }
.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 4vw, 60px); }
.member { width: min(300px, 100%); text-align: center; }
.member-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); margin-bottom: 22px; display: grid; place-items: center; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .8s, transform 1.2s var(--ease); }
.member:hover .member-photo img { filter: none; transform: scale(1.04); }
.member-initial { font-size: 90px; font-weight: 800; color: var(--line-strong); }
.member h3 { font-size: 21px; }
.member-role { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); font-size: 13px; }
.member-role::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.member p { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* الشركاء */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 2vw, 30px) 0; }
.partner-grid li { aspect-ratio: 5 / 3; display: grid; place-items: center; padding: 18px; color: var(--muted); font-weight: 700; text-align: center; transition: color .4s; }
.partner-grid img { max-height: 64px; max-width: 78%; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .4; transition: filter .4s, opacity .4s, transform .6s var(--ease); }
[data-theme="light"] .partner-grid img { filter: brightness(0); }
.partner-grid li:hover { color: var(--text); }
.partner-grid li:hover img { filter: none; opacity: 1; transform: scale(1.08); }
.js .partner-grid li.reveal { transform: scale(.82); }
.js .partner-grid li.reveal.is-in { transform: none; }

/* ---------- 7) الصفحات الداخلية ---------- */
.page-head { padding-top: calc(var(--header-h) + clamp(70px, 9vw, 130px)); padding-bottom: clamp(30px, 4vw, 60px); }
.page-head .bg-word { top: var(--header-h); }
.page-head .section-head { margin-bottom: 0; }
.not-found { min-height: 80vh; padding-bottom: 120px; }
.not-found .btn { margin-top: 40px; }
.about-page { align-items: start; }

.project-hero { position: relative; height: 82vh; min-height: 480px; display: flex; align-items: flex-end; padding-bottom: clamp(40px, 6vw, 80px); overflow: hidden; color: #f4f3ee; background: var(--bg-deep); }
.project-hero img { position: absolute; inset: -15% 0; width: 100%; height: 130%; object-fit: cover; }
.project-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .5)); }
.project-hero .wrap { z-index: 2; }
.project-hero h1 { font-size: clamp(36px, 6vw, 84px); line-height: 1.3; font-weight: 800; }
[dir="ltr"] .project-hero h1 { line-height: 1.1; text-transform: uppercase; }
.project-body { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(30px, 6vw, 100px); padding-block: clamp(60px, 8vw, 120px); }
.project-meta { display: grid; gap: 22px; align-content: start; }
.project-meta div { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.project-meta dt { font-size: 12px; color: var(--gold); font-weight: 700; }
.project-meta dd { font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 32px); padding-bottom: clamp(70px, 9vw, 130px); }
.gallery-item { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.gallery-item.is-wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.next-project { position: relative; display: block; padding-block: clamp(80px, 12vw, 170px); overflow: hidden; background: var(--bg-deep); color: #f4f3ee; text-align: center; z-index: 2; }
.next-project img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; transition: opacity .6s, transform 1.6s var(--ease); }
.next-project:hover img { opacity: .55; transform: scale(1.05); }
.next-project strong { display: block; font-size: clamp(32px, 6vw, 80px); line-height: 1.3; font-weight: 800; }

.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.package-card { position: relative; background: var(--bg-2); border: 1px solid var(--line); padding: 44px 34px 38px; display: flex; flex-direction: column; min-height: 400px; transition: transform .6s var(--ease), border-color .4s; }
.package-card:hover { transform: translateY(-10px); border-color: var(--gold); }
.package-num { position: absolute; top: 22px; inset-inline-end: 26px; font: 600 54px/1 var(--font-en); color: transparent; -webkit-text-stroke: 1px var(--line-strong); }
.package-card h2 { font-size: 26px; margin-bottom: 18px; }
.package-card ul { flex: 1; color: var(--muted); font-size: 14.5px; margin-bottom: 30px; }
.package-card li { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 12px; align-items: center; }
.package-card li::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); flex: none; }

.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.contact-info, .footer-info { display: grid; gap: 26px; }
.contact-info span, .footer-info span { display: block; font-size: 12px; color: var(--gold); font-weight: 700; }
.contact-info a, .contact-info p, .footer-info a, .footer-info p { font-size: 17px; font-weight: 700; }
[dir="rtl"] .contact-info a[dir="ltr"], [dir="rtl"] .footer-info a[dir="ltr"] { display: block; text-align: right; }
.contact-info a, .footer-info a { transition: color .3s; }
.contact-info a:hover, .footer-info a:hover { color: var(--gold); }
.contact-form { display: grid; gap: 26px; }
.fld span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.fld input, .fld textarea { display: block; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); padding: 12px 0; border-radius: 0; transition: border-color .3s; }
[dir="rtl"] .fld input[dir="ltr"] { text-align: right; }
.fld textarea { resize: vertical; min-height: 130px; }
.fld input:focus, .fld textarea:focus { outline: 0; border-bottom-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.fld.is-invalid input, .fld.is-invalid textarea { border-bottom-color: #e07b7b; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.notice { padding: 14px 18px; font-size: 14px; font-weight: 700; border-inline-start: 3px solid; }
.notice.success { color: #7fc891; background: rgba(127, 200, 145, .1); }
.notice.error { color: #e58a8a; background: rgba(229, 138, 138, .1); }
[data-theme="light"] .notice.success { color: #2c7a41; }
[data-theme="light"] .notice.error { color: #a93a3a; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(8, 9, 8, .95); display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; justify-items: center; padding: 60px 10px; color: #fff; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; animation: lb-in .5s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }
.lightbox button { width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s; }
.lightbox button:hover { background: #fff; color: #111; }
.lightbox-close { position: absolute; top: 18px; inset-inline-end: 18px; }

/* ---------- 8) التذييل ---------- */
.footer { background: var(--bg-deep); color: #f4f3ee; --text: #f4f3ee; --muted: #9d9c94; --gold: #b3ab8a; --gold-ink: #161716; --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .16); overflow: hidden; }
.footer-main { display: grid; grid-template-columns: auto 1.5fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; padding-block: clamp(70px, 9vw, 130px); }
.footer-word { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 clamp(60px, 9vw, 130px)/1 var(--font-en); color: rgba(255, 255, 255, .07); user-select: none; }
[dir="rtl"] .footer-word { font-family: var(--font-ar); writing-mode: horizontal-tb; transform: rotate(-90deg); width: 1.3em; white-space: nowrap; display: flex; justify-content: center; }
.footer-cta h2 { margin-bottom: 40px; max-width: 560px; }
.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a { width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s, border-color .3s, transform .4s var(--ease); }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); transform: translateY(-4px); }
.socials .ico { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 30px; padding-block: 26px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom a:hover { color: var(--gold); }

.to-top { position: fixed; z-index: 80; bottom: 26px; inset-inline-end: 26px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--text); opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity .4s, transform .5s var(--ease), visibility 0s .4s; mix-blend-mode: difference; color: #fff; }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: 1.5; }
.to-top .to-top-progress { stroke: #fff; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); }
.to-top:hover .ico { transform: translateY(-3px); }
.to-top .ico { width: 18px; height: 18px; transition: transform .3s; }

/* ---------- 9) الحركة عند التمرير (تعمل فقط مع الجافاسكربت) ---------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease) var(--d, 0ms), transform 1.1s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .14em; margin-block: -.14em; }
.split .wi { display: inline-block; }
.js .split .wi { transform: translateY(115%); transition: transform 1s var(--ease) calc(var(--i) * 70ms); }
.js .split .ch { display: inline-block; transform: translateY(115%); transition: transform .9s var(--ease) calc(var(--i) * 22ms); }
.js .split.is-in .wi, .js .split.is-in .ch { transform: none; }
.js .split:not(.is-split) { visibility: hidden; }

.js .img-reveal > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease-io) var(--d, 0ms), transform 1.8s var(--ease) var(--d, 0ms), filter .8s; }
.js .img-reveal > img:not([data-parallax]) { transform: scale(1.25); }
.js .img-reveal.is-in > * { clip-path: inset(0); }
.js .img-reveal.is-in > img:not([data-parallax]) { transform: scale(1); }
.js .about-image.img-reveal > img.about-img-b { transition: clip-path 1.3s var(--ease-io), opacity .9s var(--ease), transform 1.4s var(--ease); }
.js .about-image.img-reveal.is-in > img.about-img-b { transform: scale(1.08); }
.js .about-image.img-reveal.is-in.is-swapped > img.about-img-b { transform: scale(1); }
.js .about-media .hatch { opacity: 0; transition: opacity 1s .8s; }
.js .about-media:has(.is-in) .hatch { opacity: .6; }
.js .about-media:has(.is-swapped) .hatch { opacity: 0; transition-delay: 0s; transition-duration: .5s; }

/* ---------- 10) الجوال ---------- */
@media (max-width: 1000px) {
  :root { --header-h: 76px; }
  .main-nav { display: none; }
  .site-header.is-solid { height: 64px; }
  .brand-text { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .hero-panel { width: min(440px, 48vw); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-word { display: none !important; }
  .package-grid { grid-template-columns: 1fr 1fr; }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  :root { --wrap: 88vw; }
  body { font-size: 15px; }
  .grid-lines i:nth-child(2), .grid-lines i:nth-child(5) { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text { font-size: 13px; max-width: 38vw; }
  .header-tools { gap: 10px; }
  .theme-toggle { width: 36px; height: 36px; }

  .hero { min-height: 600px; }
  .hero-media { inset-inline: 0; inset-block: 0 74px; }
  .hero-panel { top: auto; bottom: 74px; transform: none; width: 86%; min-height: 0; padding: 26px 24px; gap: 20px; }
  .hero-title, .hero-caption h1 { font-size: 26px; }
  .hero-ui { inset-inline: 0; height: 74px; padding-inline: 6vw; }
  .hero-arrows, .hero-scroll, .hero-hatch { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .service { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 34px 6px; }
  .service:last-child { border-bottom: 0; }
  .about { grid-template-columns: 1fr; }
  .about-image { aspect-ratio: 4 / 3.6; }
  .hatch { inset-inline-end: -14px; bottom: -14px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 34px 6px; }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .project-grid, .gallery { grid-template-columns: 1fr; }
  .project-card.is-wide .project-media, .project-media, .gallery-item, .gallery-item.is-wide { aspect-ratio: 4 / 3.4; }
  .project-info { padding: 34px 20px 18px; min-width: 70%; }
  .project-info h3 { font-size: 18px; margin-bottom: 10px; }

  .partner-grid { grid-template-columns: 1fr 1fr; }
  .project-body, .contact-layout, .footer-main, .package-grid { grid-template-columns: 1fr; }
  .sketch { opacity: .5; }
  .lightbox { grid-template-columns: 1fr; padding: 70px 12px 90px; }
  .lightbox-prev, .lightbox-next { position: absolute; bottom: 22px; }
  .lightbox-prev { inset-inline-start: calc(50% - 58px); }
  .lightbox-next { inset-inline-end: calc(50% - 58px); }
  .to-top { bottom: 16px; inset-inline-end: 16px; }
  .footer-bottom { padding-bottom: 80px; }
}

/* ---------- 11) تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .grid-lines i::after, .hero-scroll i::after { display: none; }
  .js .reveal, .js .split .wi, .js .split .ch, .js .img-reveal > *, .hero-slide img, .project-info, .project-info > * { opacity: 1; transform: none !important; clip-path: none; }
  .js .sketch path { stroke-dashoffset: 0; }
}

@media print {
  .loader, .grid-lines, .cursor-dot, .cursor-ring, .site-header, .to-top, .mobile-menu { display: none !important; }
  .js .reveal, .js .split .wi, .js .img-reveal > * { opacity: 1; transform: none; clip-path: none; }
}

/* بارالاكس: القيم تُحسب في site.js وتُمرَّر كمتغيرات */
.js [data-parallax] { transform: translateY(var(--py, 0)); will-change: transform; }
.js .bg-word[data-parallax-x] { transform: translateX(var(--px, 0)); }
[dir="rtl"] .mobile-menu-foot a[dir="ltr"] { text-align: right; }

/* ---------- البحث + اللوحة الجانبية ---------- */
.overlay-close { position: absolute; top: 24px; inset-inline-end: 24px; width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s, transform .5s var(--ease); }
.overlay-close:hover { background: var(--gold); color: var(--gold-ink); transform: rotate(90deg); }

.search-box { position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, var(--bg-deep) 96%, transparent); color: #f4f3ee; --line-strong: rgba(255, 255, 255, .25); --muted: #9d9c94; display: grid; place-items: center; padding: 8vw; clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io); }
.search-open .search-box { clip-path: inset(0); }
.search-box form { width: min(820px, 100%); opacity: 0; transform: translateY(30px); transition: opacity .5s .3s, transform .7s var(--ease) .3s; }
.search-open .search-box form { opacity: 1; transform: none; }
.search-box label { display: block; color: var(--gold); font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.search-field { display: flex; align-items: center; border-bottom: 1px solid var(--line-strong); transition: border-color .3s; }
.search-field:focus-within { border-color: var(--gold); }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: clamp(22px, 4vw, 46px); font-weight: 700; padding: 14px 0; color: inherit; }
.search-field input::placeholder { color: rgba(255, 255, 255, .25); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field button { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; transition: background-color .3s, color .3s; }
.search-field button:hover { background: var(--gold); color: #161716; }
.search-note { color: var(--muted); margin-bottom: 30px; }
.search-note a { color: var(--gold); margin-inline-start: 14px; border-bottom: 1px solid; }

.side-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .5s; }
.panel-open .side-backdrop { opacity: 1; }
.side-panel { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 160; width: min(440px, 92vw); background: var(--bg-2); padding: 90px clamp(26px, 4vw, 50px) 40px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; transform: translateX(-102%); transition: transform .7s var(--ease-io); border-inline-start: 1px solid var(--line); }
[dir="ltr"] .side-panel { transform: translateX(102%); }
.panel-open .side-panel { transform: none; }
.side-panel > * { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .6s var(--ease); }
.panel-open .side-panel > * { opacity: 1; transform: none; transition-delay: calc(.3s + var(--n, 0) * 70ms); }
.side-panel > :nth-child(3) { --n: 1; } .side-panel > :nth-child(4) { --n: 2; } .side-panel > :nth-child(5) { --n: 3; } .side-panel > :nth-child(6) { --n: 4; } .side-panel > :nth-child(7) { --n: 5; }
.side-panel .overlay-close { opacity: 1; transform: none; }
.side-panel .brand-mark { width: 54px; height: 54px; }
.side-panel h2 { font-size: 22px; }
.side-panel > p { color: var(--muted); font-size: 14.5px; }
.side-info { display: grid; gap: 18px; padding-block: 18px; border-block: 1px solid var(--line); }
.side-info span { display: block; font-size: 12px; color: var(--gold); font-weight: 700; }
.side-info a, .side-info p { font-weight: 700; }
[dir="rtl"] .side-info a[dir="ltr"] { display: block; text-align: right; }
.side-panel .btn { align-self: flex-start; margin-top: 6px; }
.search-open, .panel-open { overflow: hidden; }
@media (max-width: 720px) { .search-toggle { width: 34px; } }
