/* ======================================================================
   مقدمة ZYRON الحركية (الصفحة الرئيسية فقط، مرة واحدة لكل جلسة)
   تسلسل (≈3.2 ثانية): خط ضوء يمتد ← حلقتان تُرسمان ← الشعار يبزغ ويومض ← العنوان اللاتيني
   ← البابان يفتحان إلى الأعلى والأسفل ← تظهر الواجهة الحقيقية.
   تعمل بالـ CSS وحده (لا تعتمد على JavaScript)، وتُلغى مع تقليل الحركة أو عند العودة.
   ====================================================================== */
.intro { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; overflow: hidden; animation: intro-gone 0s linear 3.4s forwards; }
@keyframes intro-gone { to { visibility: hidden; pointer-events: none; } }
html.no-intro .intro, html.intro-off .intro { display: none; }

/* البابان */
.intro-door { position: absolute; inset-inline: 0; height: 50.6%; background: #04060b; will-change: transform; }
.intro-door-t { top: 0; background-image: radial-gradient(70% 140% at 50% 100%, rgba(31, 95, 214, .22), transparent 70%); animation: door-up .85s cubic-bezier(.7, 0, .2, 1) 2.45s forwards; }
.intro-door-b { bottom: 0; background-image: radial-gradient(70% 140% at 50% 0%, rgba(31, 95, 214, .22), transparent 70%); animation: door-down .85s cubic-bezier(.7, 0, .2, 1) 2.45s forwards; }
@keyframes door-up { to { transform: translateY(-101%); } }
@keyframes door-down { to { transform: translateY(101%); } }

/* خط الضوء عند الالتقاء */
.intro::after { content: ""; position: absolute; z-index: 3; inset-inline: 0; top: 50%; height: 2px; margin-top: -1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #8fc0ff 20%, #fff 50%, #8fc0ff 80%, transparent); transform: scaleX(0); opacity: 1;
  animation: seam-in 1.1s cubic-bezier(.2, .7, .2, 1) .1s forwards, seam-out .45s ease-in 2.5s forwards; }
@keyframes seam-in { to { transform: scaleX(1); } }
@keyframes seam-out { to { opacity: 0; } }

/* المنصة: الحلقات والشعار والعنوان */
.intro-stage { position: relative; z-index: 2; width: min(520px, 82vw); aspect-ratio: 1; display: grid; place-items: center; animation: stage-out .65s cubic-bezier(.5, 0, 1, .5) 2.15s forwards; }
@keyframes stage-out { to { opacity: 0; transform: scale(1.14); } }
.intro-ring { position: absolute; inset: -6%; width: 112%; height: 112%; overflow: visible; fill: none; stroke: #8fc0ff; stroke-width: .8; }
.intro-ring circle { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .75; animation: draw 1.5s cubic-bezier(.3, .6, .2, 1) .3s forwards; }
.intro-ring .r2 { stroke-width: .5; opacity: .5; animation-delay: .55s; animation-direction: normal; }
.intro-ring .ticks { transform-origin: 0 0; animation: ticks-spin 5s linear .3s both; }
.intro-ring .ticks line { stroke: #cfe3ff; stroke-width: 1; opacity: 0; animation: tick-on .4s ease-out forwards; }
.intro-ring .ticks line:nth-child(1) { animation-delay: .9s; } .intro-ring .ticks line:nth-child(2) { animation-delay: .95s; }
.intro-ring .ticks line:nth-child(3) { animation-delay: 1s; } .intro-ring .ticks line:nth-child(4) { animation-delay: 1.05s; }
.intro-ring .ticks line:nth-child(5) { animation-delay: 1.1s; } .intro-ring .ticks line:nth-child(6) { animation-delay: 1.15s; }
.intro-ring .ticks line:nth-child(7) { animation-delay: 1.2s; } .intro-ring .ticks line:nth-child(8) { animation-delay: 1.25s; }
.intro-ring .ticks line:nth-child(9) { animation-delay: 1.3s; } .intro-ring .ticks line:nth-child(10) { animation-delay: 1.35s; }
.intro-ring .ticks line:nth-child(11) { animation-delay: 1.4s; } .intro-ring .ticks line:nth-child(12) { animation-delay: 1.45s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tick-on { to { opacity: .9; } }
@keyframes ticks-spin { to { transform: rotate(90deg); } }
.intro-logo { position: relative; width: 78%; height: auto; mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%);
  opacity: 0; animation: logo-in 1.5s cubic-bezier(.2, .7, .2, 1) .55s forwards; }
@keyframes logo-in {
  0% { opacity: 0; transform: scale(.7); filter: blur(14px) brightness(.8); }
  55% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); }
  72% { filter: blur(0) brightness(1.7); }
  100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); }
}
.intro-tag { position: absolute; inset-inline: 0; bottom: 6%; margin: 0; text-align: center; font: 600 .95rem/1 var(--f-latin); color: #a9bde0; letter-spacing: .7em; opacity: 0; padding-inline-start: .7em; animation: tag-in 1.1s cubic-bezier(.2, .7, .2, 1) 1.25s forwards; }
@keyframes tag-in { from { opacity: 0; letter-spacing: .9em; } to { opacity: 1; letter-spacing: .38em; } }

/* زر التخطي */
.intro-skip { position: absolute; z-index: 4; inset-inline-end: 22px; bottom: 22px; min-height: 44px; padding: 0 16px; font: 500 .9rem/1 var(--f-body); color: #b9c2d4; background: rgba(10, 15, 28, .6); border: 1px solid rgba(176, 196, 230, .28); cursor: pointer; opacity: 0; animation: skip-in .5s ease-out .7s forwards; }
.intro-skip:hover { color: #fff; border-color: #8fc0ff; }
@keyframes skip-in { to { opacity: 1; } }

/* الواجهة الحقيقية تدخل بعد فتح البابين */
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-intro):not(.intro-off) .rune-ring { animation-delay: 2.5s; }
  html:not(.no-intro):not(.intro-off) .hero-logo { animation-delay: 2.75s, 4.1s; }
  html:not(.no-intro):not(.intro-off) .hero-title { animation-delay: 3.15s, 4.1s; }
  html:not(.no-intro):not(.intro-off) .hero-lead { animation-delay: 3.3s; }
  html:not(.no-intro):not(.intro-off) .hero-actions { animation-delay: 3.45s; }
  html:not(.no-intro):not(.intro-off) .hero-horizon { animation-delay: 2.7s; }
}
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }
