/* ============================================================
   وريد — تجربة العرض التقديمي
   ليست شرائح: مشهد واحد = فكرة واحدة، حركة للكشف لا للإبهار
   ============================================================ */

:root {
  --pr-bg: #0A0A0C;
  --pr-ink: #F7F3ED;
  --pr-mute: rgba(247, 243, 237, 0.55);
  --pr-gold: #C9A227;
  --pr-burg: #8B1E2D;
  --pr-teal: #1F6B7A;
  --pr-earth: #BF7F4D;
}

html, body { height: 100%; }

body.present {
  margin: 0;
  background: var(--pr-bg);
  color: var(--pr-ink);
  font-family: var(--font-ar, "Cairo", sans-serif);
  overflow: hidden;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body.present.cursor-hidden { cursor: none; }

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(191, 127, 77, 0.1), transparent 55%),
    radial-gradient(ellipse at 82% -12%, rgba(139, 30, 45, 0.16), transparent 52%),
    var(--pr-bg);
}

/* شبكة عروق خافتة في الخلفية */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247, 243, 237, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 237, 0.022) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vw, 110px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s;
}

.scene.on { opacity: 1; visibility: visible; }

.sc-center { width: 100%; max-width: 1180px; text-align: center; }

.sc-split {
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  text-align: start;
}

@media (max-width: 900px) {
  .sc-split { grid-template-columns: 1fr; text-align: center; }
  .sc-split .sp-visual { display: none; }
}

/* ---------- عناصر نصية مشتركة ---------- */

.sc-title {
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  font-weight: 900;
  color: var(--pr-ink);
  line-height: 1.45;
  margin: 0 0 clamp(26px, 4vh, 48px);
}

.sc-conclusion {
  font-size: clamp(1.25rem, 2.8vw, 2.1rem);
  font-weight: 800;
  color: var(--pr-ink);
  line-height: 1.6;
  margin: clamp(26px, 4vh, 46px) 0 0;
}

.sc-conclusion.big { font-size: clamp(1.5rem, 3.6vw, 2.7rem); }

.sc-note {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  color: var(--pr-mute);
  margin: clamp(20px, 3vh, 34px) 0 0;
}

.gold { color: var(--pr-gold); }

/* حركات الظهور المشتركة */
.scene.on .anim-up { animation: pr-up 800ms cubic-bezier(0.22, 0.7, 0.3, 1) both; }

@keyframes pr-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pr-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 01 السؤال ---------- */

.sc-question {
  font-size: clamp(1.7rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.6;
  color: var(--pr-ink);
  margin: 0;
  opacity: 0;
}

.scene.on .sc-question { animation: pr-fade 2.2s ease 1.2s both; }

.sc-question .dots { color: var(--pr-gold); letter-spacing: 0.15em; }

/* ---------- 02 الفقد ---------- */

.loss-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 30px);
}

.loss-stack span {
  font-size: clamp(1.6rem, 4.4vw, 3.2rem);
  font-weight: 900;
  color: var(--pr-ink);
  opacity: 0;
}

.scene.on .loss-stack span {
  animation: loss-in 900ms ease both;
  animation-delay: calc(0.35s + var(--i) * 0.55s);
}

@keyframes loss-in {
  0% { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  55% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0.32; transform: translateY(0); filter: blur(0); }
}

/* ---------- 03 الحفظ المجزأ ---------- */

.frag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(14px, 2.4vw, 26px);
}

.frag {
  border: 1px solid rgba(247, 243, 237, 0.16);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 34px) 18px;
  background: rgba(247, 243, 237, 0.03);
  opacity: 0;
}

.frag b { display: block; font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--pr-ink); margin-bottom: 6px; }
.frag span { display: block; font-size: clamp(0.9rem, 1.4vw, 1.05rem); color: var(--pr-mute); }

.scene.on .frag {
  animation: frag-drift 1400ms cubic-bezier(0.22, 0.7, 0.3, 1) both;
  animation-delay: calc(0.2s + var(--i) * 0.22s);
}

@keyframes frag-drift {
  0% { opacity: 0; transform: scale(0.94); }
  45% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1) translateY(calc(var(--i) * 2px)); }
}

/* ---------- 04 الكشف ---------- */

.reveal-veins {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.reveal-veins path {
  fill: none;
  stroke: rgba(201, 162, 39, 0.55);
  stroke-width: 1.1;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.scene.on .reveal-veins path {
  animation: vein-grow 1800ms ease forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}

.reveal-veins path:nth-child(1) { animation-delay: 100ms !important; }
.reveal-veins path:nth-child(2) { animation-delay: 220ms !important; }
.reveal-veins path:nth-child(3) { animation-delay: 340ms !important; }
.reveal-veins path:nth-child(4) { animation-delay: 460ms !important; }
.reveal-veins path:nth-child(5) { animation-delay: 580ms !important; stroke: rgba(139, 30, 45, 0.7); }
.reveal-veins path:nth-child(6) { animation-delay: 700ms !important; stroke: rgba(139, 30, 45, 0.7); }
.reveal-veins path:nth-child(7) { animation-delay: 820ms !important; stroke: rgba(31, 107, 122, 0.6); }
.reveal-veins path:nth-child(8) { animation-delay: 940ms !important; stroke: rgba(31, 107, 122, 0.6); }

@keyframes vein-grow { to { stroke-dashoffset: 0; } }

.reveal-brand { position: relative; z-index: 2; }

.reveal-brand .rb-mark {
  width: clamp(72px, 9vw, 120px);
  margin: 0 auto clamp(18px, 3vh, 30px);
  opacity: 0;
  filter: drop-shadow(0 0 34px rgba(201, 162, 39, 0.3));
}

.reveal-brand .rb-name {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  color: var(--pr-ink);
  line-height: 1.1;
  margin: 0 0 clamp(14px, 2vh, 22px);
  opacity: 0;
}

.reveal-brand .rb-def {
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: var(--pr-gold);
  opacity: 0;
  margin-bottom: 10px;
}

.reveal-brand .rb-line {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  color: var(--pr-mute);
  opacity: 0;
}

.scene.on .rb-mark { animation: pr-fade 1s ease 900ms both; }
.scene.on .rb-name { animation: pr-up 1200ms cubic-bezier(0.22, 0.7, 0.3, 1) 1400ms both; }
.scene.on .rb-def { animation: pr-up 1000ms ease 2200ms both; }
.scene.on .rb-line { animation: pr-fade 1200ms ease 2900ms both; }

/* ---------- 05 ليس / هو ---------- */

.neg-list { display: grid; gap: clamp(8px, 1.4vh, 14px); justify-items: center; }

.neg-list span {
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--pr-mute);
  position: relative;
  opacity: 0;
  padding: 2px 10px;
}

.neg-list span::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 52%;
  height: 1px;
  background: rgba(139, 30, 45, 0.85);
  transform: scaleX(0);
  transform-origin: right;
}

.scene.on .neg-list span {
  animation: pr-fade 600ms ease both;
  animation-delay: calc(0.25s + var(--i) * 0.5s);
}

.scene.on .neg-list span::after {
  animation: strike 600ms ease both;
  animation-delay: calc(0.7s + var(--i) * 0.5s);
}

@keyframes strike { to { transform: scaleX(1); } }

.scene.on .sc-conclusion { animation: pr-up 1000ms cubic-bezier(0.22, 0.7, 0.3, 1) 400ms both; }

/* ---------- 06 و11 شبكة المعرفة ---------- */

.net-wrap {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
}

.net-wrap.small { max-width: 700px; aspect-ratio: 2.4 / 1; margin-top: 28px; }

.net-wrap svg { width: 100%; height: 100%; overflow: visible; }

.net-wrap .nlink {
  stroke: rgba(201, 162, 39, 0.3);
  stroke-width: 1;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

.scene.on .net-wrap .nlink { animation: vein-grow 1200ms ease both; }

.net-wrap .nnode { fill: rgba(139, 30, 45, 0.9); stroke: rgba(201, 162, 39, 0.7); stroke-width: 1.2; opacity: 0; }
.net-wrap .nnode.hub { fill: var(--pr-gold); stroke: rgba(247, 243, 237, 0.6); }
.net-wrap .nlabel { fill: rgba(247, 243, 237, 0.82); font-size: 15px; font-weight: 700; text-anchor: middle; opacity: 0; }
.net-wrap .nlabel.hub-label { fill: var(--pr-gold); font-size: 17px; }

.scene.on .net-wrap .nnode { animation: node-pop 700ms cubic-bezier(0.3, 0.8, 0.4, 1) both; }
.scene.on .net-wrap .nlabel { animation: pr-fade 700ms ease both; }

@keyframes node-pop {
  0% { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- 07 المدخلات ---------- */

.in-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 16px);
  max-width: 900px;
  margin-inline: auto;
}

.in-chips span {
  padding: clamp(9px, 1.4vw, 14px) clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(247, 243, 237, 0.2);
  border-radius: 999px;
  font-size: clamp(0.95rem, 1.7vw, 1.2rem);
  font-weight: 700;
  color: rgba(247, 243, 237, 0.82);
  opacity: 0;
}

.scene.on .in-chips span {
  animation: chip-in 700ms ease both;
  animation-delay: calc(0.15s + var(--i) * 0.11s);
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.in-funnel {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--pr-gold);
  margin: clamp(16px, 2.6vh, 28px) 0;
  opacity: 0;
}

.scene.on .in-funnel { animation: pr-fade 800ms ease 1.3s both; }

.in-engine {
  display: inline-block;
  padding: clamp(14px, 2vw, 22px) clamp(34px, 5vw, 60px);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 18px;
  background: rgba(201, 162, 39, 0.08);
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  font-weight: 900;
  color: var(--pr-gold);
  opacity: 0;
}

.scene.on .in-engine { animation: pr-up 900ms cubic-bezier(0.22, 0.7, 0.3, 1) 1.6s both; }

/* ---------- 08 التدفق ---------- */

.flow-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1.4vw, 16px);
}

.flow-line .fl-step {
  padding: clamp(12px, 1.8vw, 20px) clamp(18px, 2.6vw, 32px);
  border: 1px solid rgba(247, 243, 237, 0.2);
  border-radius: 14px;
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  font-weight: 800;
  color: rgba(247, 243, 237, 0.85);
  background: rgba(247, 243, 237, 0.03);
  opacity: 0;
}

.flow-line .fl-step.gold-step {
  border-color: rgba(201, 162, 39, 0.6);
  background: rgba(201, 162, 39, 0.1);
  color: var(--pr-gold);
}

.flow-line .fl-arrow { color: rgba(201, 162, 39, 0.8); font-size: clamp(1.1rem, 2vw, 1.5rem); opacity: 0; }

.scene.on .flow-line .fl-step {
  animation: pr-up 700ms ease both;
  animation-delay: calc(0.2s + var(--i) * 0.4s);
}

.scene.on .flow-line .fl-arrow {
  animation: pr-fade 500ms ease both;
  animation-delay: calc(0.5s + var(--i) * 0.4s);
}

/* ---------- 09 الذكاء الاصطناعي ---------- */

.verb-stack { display: grid; gap: clamp(6px, 1.2vh, 14px); justify-items: center; }

.verb-stack span {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--pr-ink);
  opacity: 0;
}

.verb-stack span:last-child { color: var(--pr-gold); }

.scene.on .verb-stack span {
  animation: pr-up 700ms cubic-bezier(0.22, 0.7, 0.3, 1) both;
  animation-delay: calc(0.2s + var(--i) * 0.5s);
}

.ai-guard {
  margin-top: clamp(30px, 5vh, 54px);
  display: inline-block;
  padding: clamp(12px, 1.8vw, 18px) clamp(22px, 3.4vw, 38px);
  border: 1px solid rgba(31, 107, 122, 0.55);
  border-radius: 14px;
  background: rgba(31, 107, 122, 0.1);
  color: rgba(247, 243, 237, 0.9);
  font-size: clamp(0.95rem, 1.7vw, 1.2rem);
  font-weight: 700;
  opacity: 0;
}

.scene.on .ai-guard { animation: pr-up 900ms ease 2.9s both; }

/* ---------- 10 و18 الخريطة ---------- */

.pr-map { width: 100%; max-width: 480px; margin-inline: auto; }
.pr-map.big { max-width: 620px; }
.pr-map svg { width: 100%; height: auto; overflow: visible; }

/* الحدود تُرسم تدريجيًا — pathLength=1 يجعل الحركة مستقلة عن طول المسار */
.pr-map .ksa {
  fill: rgba(247, 243, 237, 0.045);
  stroke: rgba(201, 162, 39, 0.6);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
}

.pr-map .ksa-isle { stroke-width: 1.6; }

.scene.on .pr-map .ksa { animation: vein-grow 2600ms ease 200ms forwards; }
.scene.on .pr-map .ksa-isle { animation-delay: 1400ms; }

.pr-map .mpin {
  fill: var(--pr-burg);
  stroke: rgba(201, 162, 39, 0.9);
  stroke-width: 2;
  opacity: 0;
  vector-effect: non-scaling-stroke;
}

.scene.on .pr-map .mpin { animation: node-pop 600ms ease both; }

.pr-map .mlink {
  stroke: rgba(201, 162, 39, 0.3);
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
}

.scene.on .pr-map .mlink { animation: vein-grow 1400ms ease both; }

.actor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: inherit;
  margin-top: clamp(20px, 3vh, 32px);
}

.actor-chips span {
  padding: 8px 18px;
  border: 1px solid rgba(247, 243, 237, 0.18);
  border-radius: 999px;
  font-size: clamp(0.88rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: rgba(247, 243, 237, 0.75);
  opacity: 0;
}

.scene.on .actor-chips span {
  animation: chip-in 600ms ease both;
  animation-delay: calc(0.8s + var(--i) * 0.13s);
}

/* ---------- 11 التحول ---------- */

.shift {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 2.6vw, 30px);
}

.shift .sh-from {
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  color: var(--pr-mute);
  font-weight: 700;
  opacity: 0;
}

.shift .sh-arrow { color: var(--pr-gold); font-size: clamp(1.3rem, 2.6vw, 2rem); opacity: 0; }

.shift .sh-to {
  font-size: clamp(1.25rem, 3vw, 2.2rem);
  color: var(--pr-ink);
  font-weight: 900;
  opacity: 0;
}

.scene.on .shift .sh-from { animation: pr-fade 800ms ease 0.3s both; }
.scene.on .shift .sh-arrow { animation: pr-fade 600ms ease 1.1s both; }
.scene.on .shift .sh-to { animation: pr-up 900ms cubic-bezier(0.22, 0.7, 0.3, 1) 1.5s both; }

/* ---------- 12 و17 المخرجات ---------- */

.out-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
  max-width: 880px;
  margin-inline: auto;
}

.out-grid.wide { max-width: 940px; }

@media (max-width: 700px) { .out-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.out-grid span {
  padding: clamp(14px, 2.2vw, 24px) 12px;
  border: 1px solid rgba(247, 243, 237, 0.15);
  border-radius: 14px;
  background: rgba(247, 243, 237, 0.03);
  font-size: clamp(0.92rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: rgba(247, 243, 237, 0.85);
  opacity: 0;
}

.scene.on .out-grid span {
  animation: chip-in 650ms ease both;
  animation-delay: calc(0.3s + var(--i) * 0.1s);
}

/* ---------- 13 الاستكشاف العميق ---------- */

.zoom-stack {
  position: relative;
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
  margin: 0 auto clamp(20px, 3vh, 34px);
}

.zoom-stack .zs-ring,
.zoom-stack .zs-core {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
}

.zoom-stack .zs-ring {
  border: 1px solid rgba(201, 162, 39, 0.45);
  width: calc(100% - var(--i) * 28%);
  height: calc(100% - var(--i) * 28%);
  opacity: 0;
}

.zoom-stack .zs-core {
  width: 22%;
  height: 22%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.9), rgba(139, 30, 45, 0.6));
  opacity: 0;
}

.scene.on .zoom-stack .zs-ring {
  animation: zoom-in 1100ms cubic-bezier(0.22, 0.7, 0.3, 1) both;
  animation-delay: calc(0.2s + var(--i) * 0.3s);
}

.scene.on .zoom-stack .zs-core { animation: zoom-in 1000ms ease 1.2s both; }

@keyframes zoom-in {
  from { opacity: 0; transform: scale(1.4); }
  to { opacity: 1; transform: scale(1); }
}

.deep-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-top: clamp(20px, 3vh, 30px); }

.deep-chips span {
  padding: 8px 20px;
  border: 1px solid rgba(247, 243, 237, 0.16);
  border-radius: 999px;
  font-size: clamp(0.88rem, 1.5vw, 1.05rem);
  color: var(--pr-mute);
  font-weight: 700;
  opacity: 0;
}

.scene.on .deep-chips span {
  animation: chip-in 600ms ease both;
  animation-delay: calc(1.6s + var(--i) * 0.15s);
}

/* ---------- 14 التحديات ---------- */

.ch-rows { display: grid; gap: clamp(9px, 1.5vh, 14px); max-width: 880px; margin-inline: auto; }

.ch-row {
  display: grid;
  grid-template-columns: 1fr 44px 1.35fr;
  align-items: center;
  gap: 10px;
  padding: clamp(12px, 1.8vw, 18px) clamp(16px, 2.4vw, 26px);
  border: 1px solid rgba(247, 243, 237, 0.12);
  border-radius: 14px;
  background: rgba(247, 243, 237, 0.025);
  opacity: 0;
}

.ch-row .ch-p { color: var(--pr-mute); font-weight: 700; font-size: clamp(0.92rem, 1.6vw, 1.15rem); text-align: start; }
.ch-row i { color: var(--pr-gold); font-style: normal; font-size: clamp(1rem, 1.8vw, 1.3rem); }
.ch-row .ch-a { color: var(--pr-ink); font-weight: 800; font-size: clamp(0.95rem, 1.7vw, 1.2rem); text-align: start; }

.scene.on .ch-row {
  animation: pr-up 700ms ease both;
  animation-delay: calc(0.25s + var(--i) * 0.3s);
}

@media (max-width: 640px) {
  .ch-row { grid-template-columns: 1fr; text-align: center; }
  .ch-row .ch-p, .ch-row .ch-a { text-align: center; }
  .ch-row i { transform: rotate(90deg); }
}

/* ---------- 15 لماذا الآن ---------- */

.conv { position: relative; padding: clamp(20px, 4vh, 40px) 0; }

.conv-items { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 1.8vw, 20px); }

.conv-items span {
  padding: clamp(9px, 1.4vw, 14px) clamp(18px, 2.6vw, 30px);
  border: 1px solid rgba(31, 107, 122, 0.5);
  border-radius: 999px;
  background: rgba(31, 107, 122, 0.08);
  font-size: clamp(0.92rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: rgba(247, 243, 237, 0.85);
  opacity: 0;
}

.scene.on .conv-items span {
  animation: chip-in 700ms ease both;
  animation-delay: calc(0.2s + var(--i) * 0.16s);
}

.conv-point {
  margin: clamp(24px, 4vh, 40px) auto 0;
  width: fit-content;
  padding: clamp(12px, 2vw, 20px) clamp(30px, 4.4vw, 52px);
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: 16px;
  background: rgba(201, 162, 39, 0.1);
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 900;
  color: var(--pr-gold);
  opacity: 0;
}

.scene.on .conv-point { animation: pr-up 1000ms cubic-bezier(0.22, 0.7, 0.3, 1) 1.4s both; }

/* ---------- 16 البداية ---------- */

.scope-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.4vw, 14px);
  padding: clamp(18px, 2.8vw, 30px) clamp(20px, 3vw, 36px);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 18px;
  background: rgba(201, 162, 39, 0.05);
  max-width: 900px;
  margin: 0 auto clamp(30px, 5vh, 50px);
  opacity: 0;
}

.scene.on .scope-box { animation: pr-up 900ms ease 0.3s both; }

.scope-box span { font-size: clamp(0.95rem, 1.7vw, 1.2rem); font-weight: 800; color: var(--pr-ink); }
.scope-box i { color: var(--pr-gold); font-style: normal; font-weight: 700; }

.phases { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(6px, 1vw, 12px); }

.phases .ph {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: clamp(12px, 1.8vw, 18px) clamp(16px, 2.4vw, 26px);
  border: 1px solid rgba(247, 243, 237, 0.16);
  border-radius: 14px;
  opacity: 0;
}

.phases .ph b { color: var(--pr-gold); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.phases .ph span { font-size: clamp(0.9rem, 1.5vw, 1.1rem); font-weight: 700; color: rgba(247, 243, 237, 0.85); }

.phases .ph-line { width: clamp(24px, 5vw, 60px); height: 1px; background: rgba(201, 162, 39, 0.5); opacity: 0; }

.scene.on .phases .ph {
  animation: pr-up 700ms ease both;
  animation-delay: calc(0.9s + var(--i) * 0.45s);
}

.scene.on .phases .ph-line {
  animation: pr-fade 500ms ease both;
  animation-delay: calc(1.25s + var(--i) * 0.45s);
}

/* ---------- 19 النهاية ---------- */

.sc-final {
  font-size: clamp(1.15rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: rgba(247, 243, 237, 0.85);
  margin: 0 0 clamp(40px, 7vh, 70px);
  opacity: 0;
}

.scene.on .sc-final { animation: pr-fade 1400ms ease 400ms both; }

.end-brand { position: relative; }

.end-brand img {
  width: clamp(60px, 8vw, 100px);
  margin: 0 auto clamp(16px, 2.4vh, 24px);
  opacity: 0;
  filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.28));
}

.end-brand h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--pr-ink);
  opacity: 0;
}

.end-brand .eb-def {
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  font-weight: 800;
  color: var(--pr-gold);
  opacity: 0;
}

.scene.on .end-brand img { animation: pr-fade 1000ms ease 1.6s both; }
.scene.on .end-brand h1 { animation: pr-up 1200ms cubic-bezier(0.22, 0.7, 0.3, 1) 2s both; }
.scene.on .end-brand .eb-def { animation: pr-fade 1200ms ease 2.7s both; }

.pulse-ring {
  position: absolute;
  top: clamp(-10px, -1vh, 0px);
  inset-inline: 0;
  margin: auto;
  width: clamp(80px, 11vw, 140px);
  height: clamp(80px, 11vw, 140px);
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.5);
  opacity: 0;
}

.scene.on .pulse-ring { animation: pulse-out 2.6s ease-out 2s infinite; }

@keyframes pulse-out {
  0% { opacity: 0.7; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(2.1); }
}

/* ============================================================
   واجهة التحكم
   ============================================================ */

.pr-ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.6s;
}

body.present.idle .pr-ui { opacity: 0; }

.pr-ui > * { pointer-events: auto; }

/* شريط التقدم */
.pr-bar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pr-gold), var(--pr-burg));
  width: 0;
  transition: width 0.5s ease;
}

/* أزرار التنقل */
.pr-nav {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 26px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.pr-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(247, 243, 237, 0.22);
  background: rgba(20, 20, 22, 0.7);
  color: var(--pr-ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  font-family: inherit;
}

.pr-btn:hover { border-color: var(--pr-gold); color: var(--pr-gold); background: rgba(201, 162, 39, 0.1); }
.pr-btn.wide { width: auto; padding: 0 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; gap: 7px; }
.pr-btn[disabled] { opacity: 0.3; cursor: default; }
.pr-btn[disabled]:hover { border-color: rgba(247, 243, 237, 0.22); color: var(--pr-ink); background: rgba(20, 20, 22, 0.7); }

.pr-counter {
  font-family: var(--font-en, Montserrat), sans-serif;
  font-size: 0.82rem;
  color: rgba(247, 243, 237, 0.45);
  letter-spacing: 0.1em;
  margin-inline-start: 6px;
}

/* أدوات أعلى الشاشة */
.pr-tools { position: fixed; top: 22px; inset-inline-end: 26px; display: flex; gap: 10px; }

.pr-home {
  position: fixed;
  top: 22px;
  inset-inline-start: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 243, 237, 0.6);
  font-size: 0.85rem;
  font-weight: 700;
}

.pr-home img { width: 26px; opacity: 0.9; }
.pr-home:hover { color: var(--pr-gold); }

/* عنوان المشهد الحالي (وضع الاستكشاف) */
.pr-label {
  position: fixed;
  bottom: 30px;
  inset-inline-end: 26px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(247, 243, 237, 0.45);
}

/* ---------- قائمة الاستكشاف ---------- */

.pr-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(14px);
  padding: clamp(60px, 9vh, 100px) clamp(24px, 5vw, 70px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.pr-menu.on { opacity: 1; visibility: visible; }

.pr-menu h3 {
  font-size: 1.4rem;
  color: var(--pr-ink);
  margin: 0 0 6px;
  font-weight: 900;
}

.pr-menu .mnote { color: var(--pr-mute); font-size: 0.9rem; margin-bottom: 30px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  max-width: 1100px;
}

.menu-grid button {
  text-align: start;
  padding: 16px 20px;
  border: 1px solid rgba(247, 243, 237, 0.14);
  border-radius: 14px;
  background: rgba(247, 243, 237, 0.03);
  color: rgba(247, 243, 237, 0.85);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-grid button:hover { border-color: var(--pr-gold); background: rgba(201, 162, 39, 0.07); transform: translateY(-2px); }
.menu-grid button.current { border-color: var(--pr-gold); color: var(--pr-gold); }

.menu-grid button .mn {
  font-family: var(--font-en, Montserrat), sans-serif;
  font-size: 0.8rem;
  color: rgba(201, 162, 39, 0.8);
  flex: none;
}

.pr-menu .menu-close { position: fixed; top: 22px; inset-inline-end: 26px; }

/* ---------- وضع المتحدث ---------- */

.presenter {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #0E0E10;
  display: none;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 20px;
}

body.presenter-on .presenter { display: grid; }

.presenter .p-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.presenter .p-timer {
  font-family: var(--font-en, Montserrat), sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--pr-gold);
  letter-spacing: 0.06em;
}

.presenter .p-actions { display: flex; gap: 10px; align-items: center; }

.presenter .p-main,
.presenter .p-side {
  border: 1px solid rgba(247, 243, 237, 0.12);
  border-radius: 16px;
  padding: 22px 26px;
  overflow-y: auto;
  background: rgba(247, 243, 237, 0.025);
}

.presenter .p-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: rgba(201, 162, 39, 0.85);
  font-weight: 700;
  margin-bottom: 12px;
}

.presenter .p-scene-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--pr-ink);
  margin-bottom: 16px;
  line-height: 1.4;
}

.presenter .p-notes {
  font-size: 1.15rem;
  line-height: 2;
  color: rgba(247, 243, 237, 0.85);
}

.presenter .p-next {
  font-size: 1.15rem;
  color: rgba(247, 243, 237, 0.7);
  font-weight: 700;
  line-height: 1.9;
}

.presenter .p-keys { margin-top: 20px; font-size: 0.82rem; color: rgba(247, 243, 237, 0.4); line-height: 2.1; }
.presenter .p-keys kbd {
  font-family: var(--font-en, Montserrat), sans-serif;
  border: 1px solid rgba(247, 243, 237, 0.2);
  border-radius: 5px;
  padding: 1px 7px;
  margin-inline-end: 6px;
  font-size: 0.76rem;
}

@media (max-width: 820px) {
  .presenter { grid-template-columns: 1fr; }
}

/* ---------- تلميح المفاتيح عند البدء ---------- */

.pr-hint {
  position: fixed;
  bottom: 90px;
  inset-inline: 0;
  text-align: center;
  color: rgba(247, 243, 237, 0.4);
  font-size: 0.82rem;
  z-index: 30;
  transition: opacity 0.6s;
}

.pr-hint.gone { opacity: 0; }

.pr-hint kbd {
  font-family: var(--font-en, Montserrat), sans-serif;
  border: 1px solid rgba(247, 243, 237, 0.2);
  border-radius: 5px;
  padding: 1px 7px;
  margin-inline: 3px;
  font-size: 0.76rem;
}

/* ---------- احترام تقليل الحركة ---------- */

@media (prefers-reduced-motion: reduce) {
  .scene, .scene * { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.15s !important; }
  .scene.on .loss-stack span { opacity: 0.6 !important; }
  .scene.on .pulse-ring { animation: none !important; opacity: 0.3 !important; }
}

/* ---------- شاشات صغيرة ---------- */

@media (max-width: 560px) {
  .pr-nav { inset-inline-start: 16px; bottom: 18px; }
  .pr-tools { inset-inline-end: 16px; top: 16px; }
  .pr-home { inset-inline-start: 16px; top: 16px; font-size: 0; gap: 0; }
  .pr-label { display: none; }
}

/* ---------- شاشة ما بعد العرض ---------- */
/* ملاحظة: السيناريو ينتهي على الشعار وحده (المشهد ١٩)، وهذه شاشة تالية
   منفصلة تظهر بعده — فلا تُكسر خاتمة العرض ويبقى للحضور مخرج واضح */

.pr-outro {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(139, 30, 45, 0.22), transparent 58%),
    radial-gradient(ellipse at 50% -10%, rgba(201, 162, 39, 0.1), transparent 50%),
    rgba(8, 8, 10, 0.97);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.pr-outro.on { opacity: 1; visibility: visible; }

.pr-outro::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 18px;
  pointer-events: none;
}

.pr-outro .outro-inner { position: relative; max-width: 660px; }

.pr-outro .outro-mark {
  width: clamp(60px, 8vw, 92px);
  margin: 0 auto clamp(20px, 3vh, 30px);
  opacity: 0;
  filter: drop-shadow(0 0 28px rgba(201, 162, 39, 0.28));
}

.pr-outro h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--pr-ink);
  margin: 0 0 10px;
  opacity: 0;
}

.pr-outro .outro-sub {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 800;
  color: var(--pr-gold);
  margin: 0 0 18px;
  opacity: 0;
}

.pr-outro .outro-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto clamp(20px, 3vh, 30px);
  opacity: 0;
}

.pr-outro .outro-by::before,
.pr-outro .outro-by::after {
  content: "";
  width: clamp(28px, 6vw, 60px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
}

.pr-outro .by-name {
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 900;
  color: var(--pr-ink);
}

.pr-outro .outro-line {
  font-size: clamp(0.9rem, 1.7vw, 1.1rem);
  color: var(--pr-mute);
  margin: 0 0 34px;
  opacity: 0;
}

.pr-outro .outro-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
}

.pr-outro.on .outro-mark { animation: pr-fade 900ms ease 200ms both; }
.pr-outro.on h2 { animation: pr-up 900ms cubic-bezier(0.22, 0.7, 0.3, 1) 450ms both; }
.pr-outro.on .outro-sub { animation: pr-fade 800ms ease 850ms both; }
.pr-outro.on .outro-by { animation: pr-up 900ms cubic-bezier(0.22, 0.7, 0.3, 1) 1200ms both; }
.pr-outro.on .outro-line { animation: pr-fade 800ms ease 1700ms both; }
.pr-outro.on .outro-actions { animation: pr-up 800ms ease 2000ms both; }
