/* =========================================================
   الخطوط — مستضافة عندنا، ولا طلب يغادر إلى نطاق خارجي
   قرار عارف 24 أكتوبر 2026: استضف الخطوط عندنا حتى تصدق
   جملةُ البوابة حرفياً، بدل أن تُليَّن الجملة
   الرخص والمصادر في fonts/LICENSES.txt
   ملف واحد لكل عائلة: Google تخدم خطاً متغيّراً واحداً لكل
   الأوزان (مُتحقق: بصمة sha256 واحدة لـ600 و700)، فنعلن
   مدى الوزن لا وزناً مفرداً
   ========================================================= */
@font-face{
  font-family:'Alexandria'; font-style:normal; font-weight:600 700; font-display:swap;
  src:url('fonts/alexandria-arabic.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face{
  font-family:'Readex Pro'; font-style:normal; font-weight:400 600; font-display:swap;
  src:url('fonts/readexpro-arabic.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face{
  font-family:'Manrope'; font-style:normal; font-weight:400 600; font-display:swap;
  src:url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* =========================================================
   الورشة — تجربة الاستوديو · T-091 · AAA Pulse
   الهوية من aaa-pulse-identity-tokens/tokens.css (T-068) حرفاً بحرف
   ========================================================= */

:root{
  --ink:#0B0B0B; --ink-2:#161616; --white:#FFFFFF;
  --w-75:rgba(255,255,255,.76); --w-60:rgba(255,255,255,.62);
  --w-45:rgba(255,255,255,.46); --w-30:rgba(255,255,255,.3);
  --w-12:rgba(255,255,255,.12);
  --cyan:#18C7D9;
  --font-lat:'Manrope','Segoe UI',system-ui,sans-serif;
  --font-ar:'Readex Pro','Segoe UI',Tahoma,sans-serif;
  --font-ar-display:'Alexandria','Readex Pro',Tahoma,sans-serif;
  --ease:cubic-bezier(.16,1,.3,1);
  --gutter:clamp(20px,4vw,64px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --bench:76%;              /* ارتفاع المنضدة: السطح الذي يقف عليه كل بناء */
  --build-h:min(38vh,340px);
  --anchor:50%;             /* موضع ارتساء المحطة الحالية على المنضدة */
}

*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
html{background:var(--ink)}
body{
  margin:0; background:var(--ink); color:var(--white);
  font-family:var(--font-ar); font-size:16px; line-height:1.8;
  -webkit-font-smoothing:antialiased; overflow:hidden;
}
/* الحرف العربي متصل: لا تباعد سالب أبداً (دليل الكتابة، القاعدة ١) */
[dir="rtl"]{letter-spacing:0}
/* مكتبة الكشف تفرض nowrap لأنها بُنيت للفيديو بمقاس ثابت
   هنا العرض متغيّر، ونمط word يقطع عند المسافات وحدها فالالتفاف آمن */
.st__h.ar-wrap,.st__get.ar-wrap{display:block; white-space:normal}
.lat{font-family:var(--font-lat); direction:ltr; unicode-bidi:isolate; font-variant-numeric:tabular-nums}
i.lat{font-style:normal}   /* <i> مائل افتراضاً؛ الفواصل والأسهم ليست تشديداً */

a{color:inherit}
button{font:inherit; color:inherit; background:none; border:0; cursor:pointer}
:focus-visible{outline:2px solid var(--cyan); outline-offset:3px; border-radius:2px}

.jump{
  position:fixed; top:12px; right:-9999px; z-index:999;
  padding:12px 20px; background:var(--white); color:var(--ink);
  font-weight:600; border-radius:999px; text-decoration:none;
}
.jump:focus{right:12px}
.jump+.jump:focus{right:230px}

/* =========================================================
   البوابة
   ========================================================= */
.gate{
  position:fixed; inset:0; z-index:40; background:var(--ink);
  display:grid; place-items:center; padding:var(--gutter);
  padding-bottom:calc(var(--gutter) + var(--safe-b));
  overflow-y:auto;
}
.gate.is-out{pointer-events:none}
.gate__in{width:min(640px,100%); text-align:center}

.gate__mark{width:72px; height:auto; display:block; margin:0 auto 28px; fill:var(--white); opacity:0}
.gate__eyebrow{margin:0 0 14px; font-size:13px; line-height:1.8; color:var(--w-45); font-weight:500; opacity:0}
.gate__h{
  text-wrap:balance;
  margin:0 0 18px; font-family:var(--font-ar-display); font-weight:700;
  font-size:clamp(2.4rem,7vw,4.2rem);
  /* ١٫٥ ليست ذوقاً: ياء Alexandria 700 تنزل 0.595em تحت خط الأساس */
  line-height:1.5; opacity:0;
}
.gate__sub{margin:0 auto 38px; max-width:34ch; font-size:clamp(.95rem,1.4vw,1.08rem); line-height:1.9; color:var(--w-60); opacity:0; text-wrap:balance}

.doors{display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom:34px}
.door{
  flex:1 1 230px; max-width:280px; min-height:96px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  padding:20px 22px; border-radius:4px; text-decoration:none;
  border:1px solid var(--w-12); background:transparent;
  transition:border-color .5s var(--ease), background-color .5s var(--ease);
  opacity:0;
}
.door__t{font-family:var(--font-ar-display); font-weight:600; font-size:1.18rem; line-height:1.5}
.door__s{font-size:.82rem; line-height:1.7; color:var(--w-45); text-wrap:balance}
.door--go{border-color:var(--w-30)}
.door:hover,.door:focus-visible{border-color:var(--white); background:rgba(255,255,255,.04)}
.door--go:hover,.door--go:focus-visible{background:var(--white)}
.door--go:hover .door__t,.door--go:focus-visible .door__t{color:var(--ink)}
.door--go:hover .door__s,.door--go:focus-visible .door__s{color:rgba(11,11,11,.6)}

.gate__truth{margin:0 0 22px; font-size:.82rem; line-height:1.9; color:var(--w-45); opacity:0}
.gate__truth a{color:var(--w-60); text-underline-offset:4px}

.gate__opts{display:flex; gap:10px; justify-content:center; opacity:0}
.opt{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 16px; border-radius:999px; border:1px solid var(--w-12);
  font-size:.8rem; color:var(--w-45);
  transition:color .4s var(--ease), border-color .4s var(--ease);
}
.opt i{width:6px; height:6px; border-radius:50%; background:var(--w-30); transition:background-color .4s var(--ease)}
.opt[aria-pressed="true"]{color:var(--white); border-color:var(--w-30)}
.opt[aria-pressed="true"] i{background:var(--cyan)}
.opt:hover{color:var(--w-75)}

/* =========================================================
   المسرح
   ========================================================= */
.stage{position:fixed; inset:0; z-index:10; overflow:hidden; background:var(--ink)}
.lay{position:absolute; inset:0; pointer-events:none}

/* الشبكة — نمط الهوية الثاني، تنزلق بثلث السرعة فتعطي عمقاً بلا ثلاثية أبعاد */
.grid{position:absolute; inset:-10%; opacity:0;
  background-image:linear-gradient(to right,rgba(24,199,217,.12) 1px,transparent 1px),
                   linear-gradient(to bottom,rgba(24,199,217,.12) 1px,transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(62% 58% at 50% 58%,#000 0%,transparent 80%);
          mask-image:radial-gradient(62% 58% at 50% 58%,#000 0%,transparent 80%);
}

/* المنضدة — خط بكسل واحد يُرسم مرة عند الدخول ثم لا يُمسّ أبداً
   هو العنصر المشترك بين كل المشاهد، فالعين لا تفقد مكانها (مدموج من الاتجاه أ) */
.bench{position:absolute; inset-inline:0; top:var(--bench); height:1px; background:rgba(255,255,255,.16); transform-origin:100% 50%}
.bseg{position:absolute; top:-1px; height:3px; width:22%; opacity:0;
  background:linear-gradient(to left,transparent,var(--cyan),transparent)}

/* السكة الداخلية: علامة لكل محطة على المنضدة، تنزلق مع الكاميرا */
.track{position:absolute; inset:0}
.tick{position:absolute; top:var(--bench); inset-inline-start:var(--anchor); width:1px; height:14px; margin-top:-7px; background:var(--w-30)}
.tick__d{position:absolute; top:var(--bench); inset-inline-start:var(--anchor); width:7px; height:7px; margin:-3.5px 0 0 -3px; border-radius:50%; background:var(--cyan); opacity:0}

/* الأرضية: المونوغرام علامةً على سطح المنضدة */
/* المونوغرام علامةً محفورة على سطح المنضدة، تحت الخط لا خلف البناء */
.floor{position:absolute; inset-inline-end:var(--gutter); top:calc(var(--bench) + 14px); width:min(20vw,130px); height:auto;
  fill:var(--white); opacity:0}

/* =========================================================
   المحطة: النص فوق، والبناء يقف على المنضدة
   ========================================================= */
.st{position:absolute; inset:0}

.st__txt{position:absolute; top:clamp(80px,12vh,124px); inset-inline-start:var(--gutter); width:min(64vw,620px); text-align:start}
.st__pillar{margin:0 0 14px; font-size:12px; line-height:1.8; color:var(--w-45)}
.st__h{
  margin:0; font-family:var(--font-ar-display); font-weight:700;
  font-size:clamp(1.8rem,4.6vw,3.2rem); line-height:1.5;
  padding-bottom:.18em;              /* القناع مفتوح بعد الكشف: لا قصّ لذيل الياء */
}
.st__lead{margin:18px 0 6px; font-size:12px; color:var(--w-45)}
.st__get{margin:0 0 20px; font-size:clamp(1rem,1.7vw,1.18rem); line-height:1.9; color:var(--w-75); padding-bottom:.14em}
.st__ask{
  display:inline-flex; align-items:center; gap:10px; padding:12px 24px;
  border:1px solid var(--w-30); border-radius:999px;
  font-size:.92rem; font-weight:500; opacity:0;
}
.st__ask i{font-style:normal; font-weight:600; font-family:var(--font-lat)}

/* البناء: يقف على المنضدة بحافته السفلى */
.st__build{position:absolute; inset-inline-start:var(--anchor); bottom:calc(100% - var(--bench));
  width:var(--build-h); height:var(--build-h); transform:translateX(50%)}
.st__svg{position:absolute; inset:0; width:100%; height:100%; overflow:visible}
.st__svg [data-p]{fill:none; stroke:var(--w-60); stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke}
.st__svg [data-fill]{fill:var(--w-12); stroke:none}
.st__svg [data-pulse]{fill:var(--cyan); stroke:none}

/* =========================================================
   الخريطة — القائمة مكاناً لا شريطاً
   ========================================================= */
.map{position:fixed; inset:0; z-index:30; background:rgba(11,11,11,.95); display:none; padding:calc(var(--gutter) + 64px) var(--gutter) calc(var(--gutter) + 96px)}
.map.is-open{display:block}
.map__in{height:100%; overflow-y:auto; -webkit-overflow-scrolling:touch}
.map__h{margin:0 0 6px; font-family:var(--font-ar-display); font-weight:600; font-size:clamp(1.3rem,3vw,1.9rem); line-height:1.5}
.map__sub{margin:0 0 26px; font-size:.86rem; color:var(--w-45)}
.map__grid{display:grid; gap:10px; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); list-style:none; margin:0; padding:0}
.map__it{display:flex; gap:14px; align-items:flex-start; width:100%; text-align:start; padding:16px 18px; border:1px solid var(--w-12); border-radius:4px; transition:border-color .4s var(--ease), background-color .4s var(--ease)}
.map__it:hover,.map__it:focus-visible{border-color:var(--white); background:rgba(255,255,255,.04)}
.map__it[aria-current="true"]{border-color:var(--cyan)}
.map__n{flex:none; font-weight:400; font-size:12px; color:var(--w-45); padding-top:3px}
.map__t{font-family:var(--font-ar-display); font-weight:600; font-size:1rem; line-height:1.55}

/* =========================================================
   الواجهة الثابتة
   ========================================================= */
.ui{position:fixed; inset:0; z-index:20; pointer-events:none}
.ui[hidden]{display:none}
.ui>*{pointer-events:auto}

.ui__top{position:absolute; top:0; inset-inline:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:calc(var(--gutter)*.55) var(--gutter)}
.crumb{display:inline-flex; align-items:center; gap:10px; text-decoration:none; font-size:12px; color:var(--w-45)}
.crumb__mark{width:26px; height:auto; fill:var(--white); flex:none}
.crumb b{font-weight:500; color:var(--w-75)}
.crumb i{font-style:normal; font-family:var(--font-lat); font-weight:400; color:var(--w-30)}
.crumb span{color:var(--white)}

.ui__tools{display:flex; align-items:center; gap:6px}
.count{font-size:12px; color:var(--w-45); margin-inline-end:6px}
.tool{width:38px; height:38px; display:grid; place-items:center; border:1px solid transparent; border-radius:50%; transition:border-color .4s var(--ease)}
.tool:hover{border-color:var(--w-12)}
.tool svg{width:19px; height:19px; fill:none; stroke:var(--w-60); stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round}
.tool[aria-pressed="true"] svg{stroke:var(--white)}
.tool[aria-pressed="true"] svg .off{display:none}
.tool[aria-pressed="false"] svg .on1,.tool[aria-pressed="false"] svg .on2{display:none}
#t-calm svg .off,#t-map svg .off{display:none}

/* السكة — ٠١ يمين و٠٧ يسار: ترتيب القراءة العربي */
.rail{position:absolute; inset-inline:0; bottom:calc(var(--gutter)*.7 + 50px + var(--safe-b)); display:flex; justify-content:center; padding:0 var(--gutter)}
.rail__in{display:flex; align-items:center; direction:rtl}
.rail__b{position:relative; display:grid; place-items:center; width:40px; height:40px}
.rail__b::before{content:""; width:5px; height:5px; border-radius:50%; background:var(--w-45); transition:background-color .45s var(--ease), transform .45s var(--ease)}
.rail__b:hover::before{background:var(--white)}
.rail__b[aria-current="true"]::before{background:var(--cyan); transform:scale(1.7)}
.rail__b::after{content:""; position:absolute; inset-inline-start:-20px; width:40px; height:1px; background:var(--w-12)}
.rail__b:first-child::after{display:none}
.rail__lbl{position:absolute; bottom:100%; margin-bottom:6px; white-space:nowrap; font-size:11px; color:var(--w-45); opacity:0; transition:opacity .35s var(--ease)}
.rail__b:hover .rail__lbl,.rail__b:focus-visible .rail__lbl{opacity:1}

/* المخرج — ثابت في كل مشهد، وبخطوة واحدة */
.go{
  position:absolute; inset-inline-start:var(--gutter); bottom:calc(var(--gutter)*.7 + var(--safe-b));
  display:inline-flex; align-items:center; gap:10px; padding:13px 24px; border-radius:999px;
  background:var(--white); color:var(--ink); text-decoration:none; font-weight:600; font-size:.92rem;
  transition:transform .5s var(--ease);
}
.go i{font-style:normal; font-weight:600; font-family:var(--font-lat)}
.go:hover{transform:translateX(-3px)}

/* =========================================================
   الطبقة النصية — تعمل بلا سكربت
   ========================================================= */
.plain{max-width:760px; margin:0 auto; padding:clamp(40px,8vw,90px) var(--gutter) 90px}
.js .plain{position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap}
.nojs .gate,.nojs .stage,.nojs .ui{display:none}
.nojs body{overflow:auto}
body.is-plain{overflow:auto}
body.is-plain .plain{position:static; width:auto; height:auto; margin:0 auto; padding:clamp(40px,8vw,90px) var(--gutter) 90px; overflow:visible; clip-path:none; white-space:normal}
body.is-plain .stage,body.is-plain .ui,body.is-plain .gate{display:none}

.plain__eyebrow{margin:0 0 12px; font-size:13px; color:var(--w-45)}
.plain__h{margin:0 0 34px; font-family:var(--font-ar-display); font-weight:700; font-size:clamp(1.8rem,5vw,2.8rem); line-height:1.5}
.plain__list{list-style:none; margin:0; padding:0; display:grid; gap:2px}
.plain__list li{border-top:1px solid var(--w-12); padding:22px 0}
.plain__list h3{margin:0 0 8px; font-family:var(--font-ar-display); font-weight:600; font-size:1.15rem; line-height:1.55}
.plain__list p{margin:0 0 12px; color:var(--w-60); font-size:.95rem}
.plain__list a{color:var(--white); text-underline-offset:5px}
.plain__foot{margin-top:40px; padding-top:22px; border-top:1px solid var(--w-12); font-size:.9rem; color:var(--w-45)}
.plain__foot a{color:var(--white)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms!important; animation-duration:.01ms!important}
}

/* =========================================================
   المقاسات
   ========================================================= */
@media (max-width:719px){
  :root{--bench:72%; --build-h:min(29vh,250px)}
  /* في العمود يصير flex-basis ارتفاعاً، فكان كل باب 230px والبوابة تُمرَّر */
  .doors{flex-direction:column; align-items:stretch}
  .door{flex:0 0 auto; max-width:none; min-height:80px}
  .ui__top{padding:14px 18px}
  .crumb b,.crumb i{display:none}
  .count{display:none}
  .rail{bottom:calc(72px + var(--safe-b)); padding:0 10px}
  .rail__b{width:34px; height:34px}
  .rail__b::after{inset-inline-start:-17px; width:34px}
  .go{inset-inline:0; bottom:0; border-radius:0; justify-content:center; padding:18px 24px calc(18px + var(--safe-b))}
  .go:hover{transform:none}
  .st__txt{top:76px; inset-inline-start:18px; width:calc(100vw - 36px)}
  .st__h{font-size:clamp(1.55rem,7vw,2.1rem)}
  .st__get{font-size:1rem; margin-bottom:16px}
  .st__lead{margin-top:14px}
  .floor{inset-inline-end:18px; top:calc(var(--bench) + 10px); width:min(28vw,96px)}
  .map{padding:84px 18px 110px}
}

/* نافذة قصيرة (لابتوب ١٣″ أو نافذة غير ممتدة) */
@media (min-width:720px) and (max-height:700px){
  :root{--bench:74%; --build-h:min(30vh,240px)}
  .st__txt{top:66px; width:min(70vw,640px)}
  .st__h{font-size:clamp(1.45rem,3.2vw,2rem)}
  .st__get{margin-bottom:14px; font-size:clamp(.92rem,1.5vw,1.05rem)}
  .st__lead{margin-top:12px}
  .st__ask{padding:10px 20px; font-size:.86rem}
  .rail{bottom:calc(var(--gutter)*.45 + 42px + var(--safe-b))}
  .go{bottom:calc(var(--gutter)*.45 + var(--safe-b)); padding:10px 20px}
}

/* البوابة على شاشة قصيرة: تنكمش ولا تُمرَّر — «صفر تمرير» قيد لا رفاهية */
@media (max-height:760px){
  .gate__mark{width:54px; margin-bottom:18px}
  .gate__h{font-size:clamp(1.9rem,5.4vw,2.6rem); margin-bottom:12px}
  .gate__sub{margin-bottom:24px; font-size:.95rem; line-height:1.8}
  .doors{margin-bottom:22px; gap:10px}
  .door{flex:0 0 auto; min-height:70px; padding:14px 18px}
  .gate__truth{margin-bottom:14px; line-height:1.8}
}
@media (max-height:600px){
  .gate__mark{width:40px; margin-bottom:12px}
  .gate__eyebrow{margin-bottom:8px}
  .gate__h{font-size:clamp(1.6rem,5vw,2.1rem)}
  .gate__sub{margin-bottom:18px}
  .gate__sub br,.gate__truth br{display:none}
  .doors{flex-direction:row; margin-bottom:16px}
  .door{flex:1 1 0; min-height:60px}
}

/* أمان لأي نافذة قصيرة جداً: النص يُفضَّل على الزخرفة */
@media (max-height:520px){
  :root{--bench:76%; --build-h:min(24vh,170px)}
  .st__h{font-size:clamp(1.2rem,3vw,1.6rem)}
  .st__txt{top:54px}
  .st__lead,.floor{display:none}
  .st__get{margin-bottom:10px; font-size:.95rem; line-height:1.75}
  .rail{bottom:calc(38px + var(--safe-b))}
}
