/* الصفحة الرئيسية — الإصدار الرابع */

/* ===== الافتتاحية: العنوان العملاق + كارت أحمد عمرو ثلاثي الأبعاد (بأسلوب كارت قافلة، ورسمته من بكسلات الشعار) ===== */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(84px + env(safe-area-inset-top, 0px)); padding-bottom: var(--s5); overflow: hidden; }
.hero__in { position: relative; display: grid; width: 100%; }
.mega { font-family: var(--serif); font-weight: 900; font-size: clamp(70px, min(15vw, 24vh), 260px); line-height: 1.25; display: grid; grid-template-columns: minmax(0, 1fr); text-shadow: var(--h-glow); }
html[lang="en"] .mega { line-height: 1.02; letter-spacing: -.045em; font-size: clamp(54px, min(10.5vw, 19vh), 200px); }
.ml { display: flex; align-items: baseline; width: 100%; white-space: nowrap; animation: heroBlur 1.7s cubic-bezier(.3, .6, .3, 1) both; }
/* دخول الافتتاحية بأسلوب قافلة: العنوان يظهر ضبابيًا ثم يتضح، ثم يدخل الكارت دائرًا من الجنب */
@keyframes heroBlur { 0% { opacity: 0; filter: blur(18px); transform: translateY(14px); } 40% { opacity: .42; filter: blur(5px); transform: none; } 78% { opacity: .55; filter: blur(2px); } 100% { opacity: 1; filter: blur(0); } }
.intro-on .ml, .intro-on .hero__row { animation-play-state: paused; }
.ml > span:not(.kas):not(.bar) { flex: none; }
.ml--2 { color: var(--brand); animation-delay: .12s; }
.kas { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: clip; margin-inline: -.06em; position: relative; z-index: -1; }
.bar { flex: 1 1 0; min-width: .4em; height: .13em; margin-inline: .12em; background: currentColor; border-radius: .07em; align-self: center; translate: 0 .08em; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.hero__top { position: relative; min-width: 0; }
.hero__card { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; touch-action: pan-y; }
.hero__row { display: grid; gap: var(--s3); margin-top: clamp(28px, 7vh, 96px); animation: rise 1s 1.3s var(--ease) both; }
.hero__row .lede { max-width: 50ch; }
.hero__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker__item { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; clip-path: var(--brush); background: var(--chip); font-size: 15px; font-weight: 600; line-height: 1; transition: background-color .25s, color .25s; }
.picker__item:hover { background: var(--chip-2); }
.picker__item[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.picker__sw { width: 18px; height: 18px; display: block; flex: none; }
@media (max-width: 800px) {
  .hero { padding-top: calc(80px + env(safe-area-inset-top, 0px)); padding-bottom: var(--s4); min-height: 0; }
  .mega { font-size: clamp(64px, 22vw, 130px); }
  html[lang="en"] .mega { font-size: clamp(54px, 17vw, 120px); }
  .hero__card { position: relative; inset: auto; height: 260px; margin-block: -10px 0; pointer-events: auto; }
  .hero__row { margin-top: var(--s3); }
  .hero__bar .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .hero__bar .btn { padding: 0 10px; font-size: 15px; min-height: 52px; }
  .picker { width: 100%; flex-wrap: nowrap; }
  .picker__item { flex: 1; justify-content: center; padding: 0 6px; gap: 6px; font-size: 14px; }
}

/* شاشة الكود ثلاثية الأبعاد: كود يُكتب، ثم يبني شعار البكسل بجواره (بنفس حركة كارت قافلة) */
.card3d { --w: min(540px, 36vw, 64vh); width: var(--w); aspect-ratio: 1.55; perspective: 1700px; pointer-events: auto; cursor: grab; user-select: none; -webkit-user-select: none; animation: float 6s ease-in-out infinite; direction: ltr; }
.card3d:active { cursor: grabbing; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.card3d.is-pre .card3d__body { opacity: 0; }
.card3d__body { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx, 12deg)) rotateY(var(--ry, -18deg)) rotateZ(var(--rz, -4deg)); transition: transform .9s var(--ease); }
.card3d.is-drag .card3d__body { transition: none; }
.card3d__face { position: absolute; inset: 0; border-radius: calc(var(--w) * .045); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card3d__front { background: radial-gradient(120% 90% at 20% 0%, #1a3270 0%, #0d1c45 45%, #081232 100%); box-shadow: inset 0 0 0 calc(var(--w) * .011) #8ab9ff, inset 0 0 0 calc(var(--w) * .014) #5f93e6, inset 0 calc(var(--w) * .02) calc(var(--w) * .03) rgb(255 255 255 / .08), inset 0 calc(var(--w) * -.03) calc(var(--w) * .05) rgb(0 0 0 / .45); display: grid; grid-template-rows: auto 1fr; padding: calc(var(--w) * .014); transform: translateZ(1px); }
.card3d__edge { position: absolute; inset: 0; border-radius: calc(var(--w) * .045); background: #3f74c9; transform: translateZ(calc(var(--z) * -1px)); box-shadow: inset 0 0 0 calc(var(--w) * .006) #7aa8f0; }
.card3d__edge:last-of-type { box-shadow: 0 50px 70px -24px rgb(10 17 36 / .6); background: #2c5aa8; }
.card3d__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .09) 45%, transparent 60%); transform: translateX(var(--shine, -40%)); transition: transform .9s var(--ease); pointer-events: none; }
.ed__bar { display: flex; align-items: center; gap: calc(var(--w) * .012); padding: calc(var(--w) * .022) calc(var(--w) * .03); background: rgb(255 255 255 / .04); box-shadow: inset 0 -1px 0 rgb(138 185 255 / .14); }
.ed__bar i { width: calc(var(--w) * .018); height: calc(var(--w) * .018); border-radius: 50%; background: #ff6159; }
.ed__bar i:nth-child(2) { background: #ffbd2e; } .ed__bar i:nth-child(3) { background: #28c941; }
.ed__bar b { margin-left: calc(var(--w) * .02); font: 600 calc(var(--w) * .024)/1 var(--mono); color: #9fb3dc; }
.ed__bar em { margin-left: auto; font: 600 calc(var(--w) * .022)/1 var(--mono); font-style: normal; color: #34d399; opacity: 0; transition: opacity .3s; }
.card3d.is-done .ed__bar em { opacity: 1; }
.ed__main { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 0; }
.ed__code { margin: 0; padding: calc(var(--w) * .035) calc(var(--w) * .03); font: 500 calc(var(--w) * .026)/1.75 var(--mono); color: #c9d6f2; white-space: pre; overflow: hidden; counter-reset: ln; }
.ed__code .k { color: #ff7ab6; } .ed__code .f { color: #7cc4ff; } .ed__code .s { color: #9be29b; } .ed__code .c { color: #6c7a99; } .ed__code .n { color: #f6c177; }
.ed__cur { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: #8ab9ff; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ed__out { position: relative; display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 45%, rgb(61 139 255 / .16), transparent 70%); box-shadow: inset 1px 0 0 rgb(138 185 255 / .14); }
.card3d__art { position: relative; width: 82%; aspect-ratio: 14 / 10; }
.card3d__art i { position: absolute; left: 0; top: 0; width: calc(100% / 14); height: calc(100% / 10); border: calc(var(--w) * .0035) solid transparent; background-clip: padding-box; border-radius: 26%; opacity: 0; will-change: transform; box-shadow: inset 0 calc(var(--w) * .004) 0 rgb(255 255 255 / .45), inset 0 calc(var(--w) * -.004) 0 rgb(0 0 0 / .35), 0 calc(var(--w) * .004) calc(var(--w) * .006) rgb(0 0 0 / .45); }
.ed__name { position: absolute; bottom: 7%; left: 0; right: 0; text-align: center; font-family: var(--serif); font-weight: 900; font-size: calc(var(--w) * .042); color: #f4ead4; direction: rtl; opacity: 0; transition: opacity .4s .3s; }
html[lang="en"] .ed__name { direction: ltr; }
.card3d.is-done .ed__name { opacity: 1; }
.card3d__back { transform: rotateY(180deg) translateZ(23px); background: radial-gradient(120% 90% at 80% 0%, #1a3270 0%, #0d1c45 45%, #081232 100%); box-shadow: inset 0 0 0 calc(var(--w) * .011) #8ab9ff, inset 0 0 0 calc(var(--w) * .014) #5f93e6; color: #f4ead4; display: grid; place-content: center; justify-items: center; gap: calc(var(--w) * .025); text-align: center; }
.card3d__back svg { width: calc(var(--w) * .26); height: auto; }
.card3d__back b { font-family: var(--serif); font-weight: 900; font-size: calc(var(--w) * .07); line-height: 1.2; direction: rtl; }
.card3d__back small { font-size: calc(var(--w) * .03); color: #8ab9ff; }
html[lang="en"] .card3d { --w: min(540px, 38vw, 64vh); }
@media (max-width: 800px) { .card3d, html[lang="en"] .card3d { --w: min(360px, 88vw); } }

/* ===== الشريط المتحرك ===== */
.ticker { overflow: hidden; background: var(--acc); color: var(--on-acc); padding-block: 16px; position: relative; z-index: 2; box-shadow: var(--glow); }
.ticker__track { display: flex; width: max-content; animation: ticker 34s linear infinite; }
html[dir="ltr"] .ticker__track { animation-direction: reverse; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: var(--s4); padding-inline-end: var(--s4); font-family: var(--serif); font-size: clamp(22px, 2.5vw, 34px); font-weight: 900; line-height: 1.35; white-space: nowrap; }
.ticker__dot { width: 11px; height: 11px; border-radius: 3px; background: currentColor; opacity: .6; transform: rotate(45deg); flex: none; }
@keyframes ticker { to { transform: translateX(50%); } }

/* ===== فقرة التعريف: الكلمات تتلوّن مرّة واحدة وتبقى واضحة ===== */
.mf__text { font-family: var(--serif); font-weight: 900; font-size: clamp(32px, 4.8vw, 72px); line-height: 1.45; letter-spacing: -.005em; max-width: 24ch; text-wrap: pretty; margin-top: var(--s3); }
html[lang="en"] .mf__text { line-height: 1.15; letter-spacing: -.025em; }
.mf__w { color: var(--ink); transition: color .5s; }
.js .mf__w { color: color-mix(in srgb, var(--ink) 38%, var(--bg)); }
.js .mf__w.lit { color: var(--ink); }
.mf__w.key { position: relative; z-index: 0; white-space: nowrap; }
.mf__w.key::before { content: ""; position: absolute; z-index: -1; top: 42%; right: -.06em; bottom: 4%; left: -.06em; background: var(--acc); clip-path: var(--brush); transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease); }
html[dir="ltr"] .mf__w.key::before { transform-origin: left; }
.mf__w.key.lit::before { transform: scaleX(1); }
@supports not (color: color-mix(in srgb, red 50%, blue)) { .js .mf__w { color: var(--ink-3); } }

/* ===== أعمالنا ===== */
.rider { position: relative; overflow: hidden; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; isolation: isolate; padding-top: var(--s5); }
.rider__title { position: relative; z-index: 0; text-align: center; font-family: var(--serif); font-weight: 900; font-size: clamp(88px, 17vw, 290px); line-height: 1.2; letter-spacing: -.02em; text-shadow: var(--h-glow); }
html[lang="en"] .rider__title { line-height: 1; letter-spacing: -.05em; }
.rider__band { position: relative; z-index: 1; height: min(50vh, 500px); margin-top: calc(-1 * clamp(40px, 7vw, 120px)); }
.rider__copy { position: relative; z-index: 2; padding-block: var(--s4) var(--s3); display: flex; justify-content: space-between; align-items: end; gap: var(--s3); flex-wrap: wrap; }
.rider__lede { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 2.5vw, 38px); line-height: 1.5; max-width: 28ch; }
html[lang="en"] .rider__lede { line-height: 1.2; letter-spacing: -.01em; }
@media (max-width: 700px) { .rider { min-height: 0; } .rider__band { height: 42vh; } }
.tgh-root { overflow: hidden; container-type: size; direction: ltr; }
.tgh-band { pointer-events: none; position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.tgh-band.is-ready { opacity: 1; }
.tgh-tile { position: absolute; transform-style: preserve-3d; will-change: transform; }
.tgh-strip { position: absolute; top: 0; overflow: hidden; background: transparent; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tgh-strip.is-first { border-radius: 10px 0 0 10px; }
.tgh-strip.is-last { border-radius: 0 10px 10px 0; }
.tgh-strip img { position: absolute; top: 0; max-width: none; object-fit: cover; object-position: top center; user-select: none; }
.tgh-root.is-paused .tgh-tile { animation-play-state: paused !important; }

/* شريط أبرز المشاريع */
.feat { padding-block: var(--s3) var(--s7); }
.feat__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.feat__nav { display: flex; gap: 8px; }
.feat__nav button { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--chip); transition: background-color .2s, opacity .2s; }
.feat__nav button:hover { background: var(--chip-2); }
.feat__nav button:disabled { opacity: .35; cursor: default; }
.feat__nav svg { width: 20px; height: 20px; }
html[dir="ltr"] .feat__nav svg { transform: scaleX(-1); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 32%); gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); padding-bottom: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.feat__more { display: flex; justify-content: center; margin-top: var(--s4); }
@media (max-width: 1000px) { .rail { grid-auto-columns: minmax(280px, 46%); } }
@media (max-width: 620px) { .rail { grid-auto-columns: 84%; gap: var(--s2); } .feat__nav { display: none; } }

/* شركاء النجاح */
.logos { padding-block: 0 var(--s7); }
.logos .eyebrow { margin-bottom: var(--s3); }
.marq { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); direction: ltr; }
.marq + .marq { margin-top: 12px; }
.marq__track { display: flex; gap: 12px; width: max-content; animation: ticker2 64s linear infinite; }
.marq--rev .marq__track { animation-direction: reverse; animation-duration: 72s; }
.marq:hover .marq__track { animation-play-state: paused; }
@keyframes ticker2 { to { transform: translateX(-50%); } }
.lg { display: inline-flex; align-items: center; gap: 14px; padding: 12px 22px 12px 14px; background: var(--chip); border-radius: 16px; white-space: nowrap; transition: background-color .25s; direction: rtl; }
html[lang="en"] .lg { direction: ltr; padding: 12px 14px 12px 22px; }
.lg:hover { background: var(--chip-2); }
.lg__ic { position: relative; flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; overflow: hidden; }
/* حرف أول اسم العميل: يظهر لو شعار العميل ما اتحمّلش أو جاي بدقة ضعيفة، فمفيش مربع فاضي أو صورة مكسورة على أي موبايل */
.lg__ic::before { content: attr(data-i); font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1; color: #fff; }
.lg__ic img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; background: #fff; object-fit: contain; padding: 4px; }
.lg__ic.is-off img { display: none; }
.lg strong { font-size: 16px; font-weight: 700; display: block; line-height: 1.4; }
.lg small { font: 500 12.5px/1.4 var(--mono); color: var(--ink-3); direction: ltr; display: block; text-align: start; }

/* ===== خدماتنا: كروت متراصّة ===== */
.chs { padding-top: var(--s6); }
.chs__head { display: grid; gap: var(--s2); justify-items: start; margin-bottom: var(--s5); }
.chs__title { font-family: var(--serif); font-weight: 900; font-size: clamp(60px, 9vw, 128px); line-height: 1.25; letter-spacing: -.01em; text-shadow: var(--h-glow); }
html[lang="en"] .chs__title { line-height: 1; letter-spacing: -.045em; }
.chs__list { display: grid; gap: var(--s4); padding-bottom: var(--s6); }
.ch { will-change: transform; position: -webkit-sticky; position: sticky; top: calc(96px + env(safe-area-inset-top, 0px)); overflow: hidden; height: min(calc(100svh - 120px), 740px); border-radius: 30px; background: #0b0d10; color: #f4ead4; transform-origin: 50% 0; isolation: isolate; }
.ch__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: grayscale(1) brightness(.8) contrast(1.05); }
.ch::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to bottom, rgb(6 8 12 / .95) 0%, rgb(6 8 12 / .88) 32%, rgb(6 8 12 / .45) 58%, rgb(6 8 12 / .1) 85%); }
.ch__top { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: start; gap: var(--s2) var(--s4); padding: var(--s4) var(--s5); }
.ch__n { grid-column: 1 / -1; justify-self: end; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgb(244 234 212 / .9); direction: ltr; }
.ch__t { font-family: var(--serif); font-weight: 900; font-size: clamp(58px, 9.5vw, 160px); line-height: 1.2; letter-spacing: -.015em; }
html[lang="en"] .ch__t { line-height: 1; letter-spacing: -.045em; }
.ch__copy { display: grid; gap: 8px; max-width: 36ch; padding-top: var(--s3); }
.ch__copy strong { font-size: 23px; font-weight: 700; line-height: 1.5; color: #8ab9ff; }
.ch__copy p { font-size: 16.5px; line-height: 1.85; color: #f4ead4; }
.ch__copy .btn { margin-top: var(--s2); justify-self: start; background: #8ab9ff; color: #0a1124; }
.ch__dim { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; will-change: opacity; }
@media (max-width: 800px) {
  .ch { top: 84px; height: min(calc(100svh - 100px), 660px); border-radius: 24px; }
  .ch__top { grid-template-columns: 1fr; padding: var(--s3); }
  .ch::before { background: linear-gradient(to bottom, rgb(6 8 12 / .96) 0%, rgb(6 8 12 / .9) 50%, rgb(6 8 12 / .4) 75%, transparent 95%); }
  .ch__copy { padding-top: 0; }
}

/* ===== الباب: صورة باب حقيقي تنفتح دفّتاه مع التمرير ===== */
.door { position: relative; height: 320vh; background: #0b0906; }
.door__stage { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; background: #0b0906; }
.door__room { position: absolute; inset: -6%; z-index: 0; background-size: cover; background-position: 50% 50%; will-change: transform; } .door__room::after { content: ""; position: absolute; inset: 0; background: rgb(8 6 4 / .48); }
.door__copy { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: var(--s3); text-align: center; color: #fff; padding-inline: var(--gutter); padding-top: calc(80px + env(safe-area-inset-top, 0px)); padding-bottom: 24px; opacity: 0; will-change: transform, opacity; }
.door__title { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(84px, min(15vw, 24vh), 250px); line-height: 1.5; letter-spacing: 0; color: #f4ead4; text-shadow: 0 6px 40px rgb(0 0 0 / .45); }
html[lang="en"] .door__title { line-height: 1; letter-spacing: -.05em; font-size: clamp(80px, 15vw, 260px); }
.door__lede { font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 2.4vw, 36px); line-height: 1.55; max-width: 26ch; color: #f4ead4; }
html[lang="en"] .door__lede { line-height: 1.25; }
.door__copy .btn { background: #8ab9ff; color: #0a1124; min-width: 230px; }
/* الباب يملأ الشاشة كلها: دفّتا خشب جوز تُفتحان مع التمرير */
.entry { --H: 100vh; --dh: var(--H); --fl: var(--H); --lw: 100%; --dt: 0px; --fw: 0px; --sl: 0px; --mf: 0px;
  position: absolute; inset: 0; z-index: 2; pointer-events: none; transform-origin: 50% calc(var(--fl) - var(--dh) * .5); will-change: transform, opacity; contain: layout paint; direction: ltr; }
@supports (height: 100svh) { .entry { --H: 100svh; } }
.entry__wall, .entry__frame { display: none; }
.entry__wall { position: absolute; inset: 0; overflow: hidden; background: var(--bg);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, calc(50% - var(--lw) / 2) var(--dt), calc(50% + var(--lw) / 2) var(--dt), calc(50% + var(--lw) / 2) var(--fl), calc(50% - var(--lw) / 2) var(--fl), calc(50% - var(--lw) / 2) var(--dt)); }
/* الإطار الأسود والزجاج الجانبي */
.entry__frame { position: absolute; z-index: 3; left: calc(50% - var(--lw) / 2 - var(--sl) - var(--fw) - var(--mf)); right: calc(50% - var(--lw) / 2 - var(--sl) - var(--fw) - var(--mf)); top: calc(var(--dt) - var(--fw)); height: calc(var(--dh) + var(--fw)); border: var(--fw) solid #121212; border-bottom: 0;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), var(--door-neon-glow); }
/* الدفّتان */
.entry__door { position: absolute; z-index: 4; left: calc(50% - var(--lw) / 2); top: var(--dt); width: var(--lw); height: var(--dh); overflow: hidden; perspective: calc(var(--dh) * 2.4); display: flex; }
.leaf { position: relative; flex: 1; height: 100%; background: #4a2e1b url(/assets/door-leaf.7f62f8eac9.jpg) 0 0 / 100% 100% no-repeat; will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .4); }
.leaf--l { transform-origin: 0% 50%; }
.leaf--r { transform-origin: 100% 50%; }
.leaf--r::before { content: ""; position: absolute; inset: 0; background: inherit; background-image: url(/assets/door-leaf.7f62f8eac9.jpg); transform: scaleX(-1); }
@media (min-width: 801px) { .leaf { background-image: url(/assets/door-leafw.0e07a19d4c.jpg); } .leaf--r::before { background-image: url(/assets/door-leafw.0e07a19d4c.jpg); } }
.leaf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 230 190 / .08), transparent 40%, rgb(0 0 0 / .18)), transparent; }
.leaf__sh { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; will-change: opacity; }
.leaf--r::after { background: linear-gradient(270deg, rgb(255 230 190 / .08), transparent 40%, rgb(0 0 0 / .18)), transparent; }
.leaf::after { box-shadow: inset 0 0 0 9999px rgb(4 8 22 / calc(var(--door-dim) * .5)); }
.handle { position: absolute; z-index: 2; top: 27%; height: 44%; width: calc(var(--dh) * .011); border-radius: 99px; background: linear-gradient(90deg, #6b3d22, #e6aa7c 40%, #f6c9a3 50%, #a7653d 75%, #5d341c); box-shadow: calc(var(--dh) * .004) calc(var(--dh) * .003) calc(var(--dh) * .005) rgb(0 0 0 / .4); }
.handle::before, .handle::after { content: ""; position: absolute; left: 50%; width: calc(var(--dh) * .008); height: calc(var(--dh) * .01); transform: translateX(-50%); background: #3a2416; }
.handle::before { top: 6%; } .handle::after { bottom: 6%; }
.leaf--l .handle { right: calc(var(--dh) * .028); } .leaf--r .handle { left: calc(var(--dh) * .028); }
/* لمعة ورنيش خفيفة */
/* انعكاس ضوء على سطح الأكريليك */
@media (max-width: 760px) {
  .handle { width: 7px; }
}
.door__hint { position: absolute; z-index: 4; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #f4ead4; font-size: 15px; font-weight: 600; padding: 8px 16px; text-shadow: 0 1px 2px rgb(0 0 0 / .5); transition: opacity .4s; white-space: nowrap; }
@media (max-width: 800px) { .door { height: 230vh; } }

/* ===== اسأل المساعد الذكي ===== */
.ask { padding-block: var(--s7); }
.ask__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s5); align-items: center; }
.ask__title { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 4.6vw, 74px); line-height: 1.25; margin-block: var(--s2) var(--s3); text-wrap: balance; text-shadow: var(--h-glow); }
html[lang="en"] .ask__title { line-height: 1.04; letter-spacing: -.03em; }
.ask__list { display: grid; gap: 10px; margin-top: var(--s3); }
.ask__list li { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.ask__list svg { width: 20px; height: 20px; color: var(--ok); flex: none; }
.chat { position: relative; display: flex; flex-direction: column; height: min(620px, 78svh); border-radius: 30px; background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; }
.chat__head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.orb { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #cfe4ff, #5aa2ff 30%, #1868e8 58%, #061a4a); box-shadow: 0 0 0 4px var(--acc-2), 0 10px 30px -6px rgb(24 104 232 / .7); animation: orb 6s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from var(--a, 0deg), transparent, rgb(62 232 255 / .55), transparent 40%); animation: spin 4s linear infinite; -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 80%); mask: radial-gradient(closest-side, transparent 78%, #000 80%); }
@keyframes orb { 0%, 100% { border-radius: 50%; } 33% { border-radius: 46% 54% 52% 48%; } 66% { border-radius: 54% 46% 48% 52%; } }
.orb.is-busy { animation-duration: 1.4s; }
.chat__who { display: grid; line-height: 1.4; }
.chat__who strong { font-size: 17px; font-weight: 700; }
.chat__who small { font-size: 13.5px; color: var(--ink-3); }
.chat__body { flex: 1; overflow-y: auto; padding: 20px; display: grid; align-content: start; gap: 12px; background: var(--bg-2); overscroll-behavior: contain; }
.chat__foot { padding: 14px 16px; display: grid; gap: 10px; border-top: 1px solid var(--line); background: var(--card); }
@media (max-width: 900px) { .ask__in { grid-template-columns: 1fr; } .chat { height: min(560px, 80svh); } }

/* ===== رقم التواصل ===== */
.callbox { padding-block: var(--s6) var(--s5); }
.call { position: relative; overflow: hidden; display: grid; justify-items: center; padding: var(--s5) var(--s3) var(--s4); border-radius: 36px; background: var(--acc-deep); color: #fff; transition: background-color .4s var(--ease); text-align: center; }
:root[data-theme="dark"] .call { background: linear-gradient(135deg, #0b1d4f, #12348c); box-shadow: 0 0 0 1px rgb(120 160 255 / .25), 0 0 80px -20px rgb(47 123 255 / .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .call { background: linear-gradient(135deg, #0b1d4f, #12348c); box-shadow: 0 0 0 1px rgb(120 160 255 / .25), 0 0 80px -20px rgb(47 123 255 / .6); } }
.call:hover { background: #1868e8; }
.call__label { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.35; }
.call__num { font-family: var(--serif); font-weight: 900; letter-spacing: -.02em; font-size: clamp(52px, 11vw, 196px); line-height: 1.15; direction: ltr; display: inline-flex; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgb(140 190 255 / .4); }
.call__num i { font-style: normal; display: inline-block; transition: transform .5s var(--pop); transition-delay: calc(var(--i) * 35ms); }
.call:hover .call__num i { transform: translateY(-7%) rotate(-4deg); }
.call__sub { font-size: 16px; color: rgb(255 255 255 / .85); margin-top: var(--s1); }

/* تكبير الشعار مع التمرير (فكرة أبو طارق): سطران وبينهما بلاطة الشعار، تكبر حتى تملأ الشاشة ثم تظهر الجملة */
.zoom { position: relative; height: 300vh; }
.zoom__stage { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.zoom__head { margin: 0; display: grid; justify-items: center; gap: clamp(10px, 2vh, 22px); text-align: center; font-family: var(--serif); font-weight: 900; font-size: clamp(60px, 10.5vw, 180px); line-height: 1.12; letter-spacing: -.01em; }
html[lang="en"] .zoom__head { letter-spacing: -.045em; line-height: 1; font-size: clamp(54px, 9vw, 160px); }
.zoom__l1 { color: var(--ink); text-shadow: var(--h-glow); will-change: transform, opacity; }
.zoom__l2 { color: var(--brand); text-shadow: var(--h-glow); will-change: transform, opacity; }
.zoom__tile { --t: clamp(64px, 7vw, 120px); position: relative; will-change: transform; z-index: 3; width: var(--t); height: var(--t); margin-block: calc(var(--t) * .12); transform: rotate(-4deg); }
/* النقطة: معيّن بلون العلامة على شكل نقاط خط ثمانية، هي أول نقطة في أي فكرة، وتكبر لحد ما تملا الشاشة */
.zoom__tile::before { content: ""; position: absolute; inset: 0; background: var(--brand); transform: rotate(45deg) scale(.82); border-radius: calc(var(--t) * .04); }
.zoom__mark { display: none; }
.zoom__say { position: absolute; z-index: 4; inset: 0; margin: 0; display: grid; place-content: center; padding-inline: var(--gutter); text-align: center; font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 6.2vw, 104px); line-height: 1.4; color: #fff; opacity: 0; pointer-events: none; will-change: transform, opacity; }
html[lang="en"] .zoom__say { line-height: 1.08; letter-spacing: -.03em; }
:root[data-theme="dark"] .zoom__say { text-shadow: 0 0 34px rgb(61 139 255 / .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zoom__say { text-shadow: 0 0 34px rgb(61 139 255 / .55); } }
.reduce-motion .zoom, .no-sticky .zoom { height: auto; }

/* ===== «كل فكرة تستحق أن تُبنى»: حشد Open Peeps، وشعارنا يرسل المشاريع في أقواس ===== */
.cw { --ac: 24, 104, 232; --cw-panel: #fff; --cw-tint: #e8f0fd; --cw-line: #cfe0fb; position: relative; height: 960px; overflow: hidden; background: var(--bg); color: var(--ink); direction: ltr; isolation: isolate; }
:root[data-theme="dark"] .cw { --ac: 77, 155, 255; --cw-panel: #0e1630; --cw-tint: #13224a; --cw-line: rgba(77, 155, 255, .35); }
.cw-bg { display: none; }
.cw-bg i { position: absolute; border-radius: 50%; opacity: .16; }
.cw-bg .b1 { left: -14%; top: 48%; width: 58%; height: 84%; background: radial-gradient(closest-side, #8ab9ff, transparent); }
.cw-bg .b2 { left: 24%; top: 58%; width: 54%; height: 76%; background: radial-gradient(closest-side, #3d8bff, transparent); }
.cw-bg .b3 { right: -16%; top: 42%; width: 56%; height: 88%; background: radial-gradient(closest-side, #c6e4f1, transparent); }
:root[data-theme="dark"] .cw-bg i { opacity: .22; }
.cw-bg .dome { position: absolute; left: -28%; right: -28%; top: -52%; height: 112%; border-radius: 50%; background: radial-gradient(closest-side, var(--bg) 64%, transparent 100%); }
.cw-fx { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cw-hero { position: absolute; z-index: 6; left: 0; right: 0; top: 96px; text-align: center; padding-inline: var(--gutter); direction: rtl; }
html[lang="en"] .cw-hero { direction: ltr; }
.cw-kick { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.cw-kick i { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--ac)); box-shadow: 0 0 0 4px rgba(var(--ac), .16); }
.cw-h { margin: 14px 0 0; font-family: var(--serif); font-weight: 900; font-size: clamp(46px, 7vw, 104px); line-height: 1.25; text-shadow: var(--h-glow); }
html[lang="en"] .cw-h { line-height: 1.05; letter-spacing: -.03em; }
.cw-h em { font-style: normal; color: rgb(var(--ac)); }
.cw .ph { position: relative; white-space: nowrap; display: inline-block; }
.cw .ph::after { content: ""; position: absolute; z-index: -1; left: -.04em; right: -.04em; bottom: .14em; height: .28em; border-radius: .08em; background: var(--cw-line); transform: scaleX(0); transform-origin: 100% 50%; opacity: 0; }
html[lang="en"] .cw .ph::after { transform-origin: 0 50%; }
.cw .ph.hit::after { animation: cw-mark 1.8s cubic-bezier(.5, 0, .2, 1); }
.cw .ph.lit::after { transform: none; opacity: 1; }
@keyframes cw-mark { 0% { transform: scaleX(0); opacity: 1; } 28% { transform: scaleX(1); opacity: 1; } 76% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.cw-lead { max-width: 760px; margin: 18px auto 0; font-size: 19px; line-height: 1.8; color: var(--ink-3); }
.cw-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cw-beacon { position: absolute; z-index: 5; left: 50%; top: 470px; width: 64px; height: 64px; margin-left: -32px; }
.cw-btile { width: 100%; height: 100%; border-radius: 18px; background: rgb(var(--ac)); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 0 0 6px var(--bg), 0 0 0 7px rgba(var(--ac), .18); }
:root[data-theme="dark"] .cw-btile { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 0 0 6px rgb(255 255 255 / .06), 0 0 30px rgba(var(--ac), .7); }
.cw-btile svg { width: 38px; height: 38px; }
.cw-compose { position: absolute; z-index: 5; left: 50%; top: 548px; pointer-events: none; }
.cw-cen { position: absolute; left: 0; top: 0; transform: translateX(-50%); width: max-content; }
.cw-cbox { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--cw-panel); box-shadow: 0 0 0 1px var(--line); font-size: 14px; white-space: nowrap; transform: scale(0); transform-origin: 50% 0; direction: rtl; }
html[lang="en"] .cw-cbox { direction: ltr; }
.cw-lab { height: 24px; padding: 0 10px; border-radius: 999px; background: var(--cw-tint); color: rgb(var(--ac)); font-size: 12.5px; font-weight: 700; line-height: 24px; }
.cw-caret { width: 1.5px; height: 15px; background: rgb(var(--ac)); animation: cw-blink 1s steps(1) infinite; }
@keyframes cw-blink { 50% { opacity: 0; } }
.cw-crowd { position: absolute; z-index: 2; left: 0; right: 0; top: 600px; height: 360px; pointer-events: none; opacity: 0; transition: opacity .9s; }
.cw.is-on .cw-crowd { opacity: 1; }
.cw-pw { position: absolute; left: 0; }
.cw-pe { width: 100%; height: 100%; will-change: transform; transform-origin: 50% 88%; }
.cw-hp { position: relative; width: 100%; height: 100%; }
.cw-pw img { display: block; width: 100%; height: 100%; transition: opacity .45s, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
:root[data-theme="dark"] .cw-pw img { opacity: .92; }
.cw-ok { position: absolute; left: 64%; top: 8%; width: 24px; height: 24px; border-radius: 50%; background: rgb(var(--ac)); box-shadow: 0 0 0 2.5px #fff, 0 6px 12px -4px rgba(var(--ac), .6); display: grid; place-items: center; transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.7, .5, 1); }
.cw-ok svg { width: 13px; height: 13px; }
.cw-pw.done .cw-ok { transform: scale(1); }
.cw-tip { position: absolute; z-index: 4; left: 0; top: 0; pointer-events: none; will-change: transform; }
.cw-tip .cw-cen { top: auto; bottom: 0; }
.cw-tbox { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 12px; background: var(--cw-panel); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgb(10 17 36 / .42); font-size: 14px; font-weight: 700; white-space: nowrap; transform: scale(0); transform-origin: 50% 100%; direction: rtl; color: var(--ink); }
html[lang="en"] .cw-tbox { direction: ltr; }
.cw-tbox::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--cw-panel); transform: rotate(45deg); }
.cw-tbox.cw-reply { font-weight: 500; }
.cw-tg { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; font-weight: 700; }
.cw-tg.caution { color: #7a5a12; background: #fbf3db; }
.cw-tg.route { color: #0f4fb8; background: #dbe8fd; }
.cw-tg.plain { color: #4b4a47; background: #efefed; }
@media (max-width: 760px) {
  .cw { height: 840px; }
  .cw-hero { top: 64px; }
  .cw-lead { font-size: 16.5px; }
  .cw-beacon { top: 420px; width: 54px; height: 54px; margin-left: -27px; }
  .cw-compose { top: 488px; }
  .cw-crowd { top: 540px; height: 300px; }
  .cw-tbox { height: 36px; font-size: 12.5px; }
  .cw-cbox { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .cw * { animation: none !important; transition: none !important; } }

/* الأداء: صور مشهد الباب لا تُحمّل إلا عند الاقتراب منه */
.lazy-bg .door__room, .lazy-bg .leaf, .lazy-bg .leaf--r::before { background-image: none !important; }
