/* ==========================================================================
   تجربة: مقدمة أول دخول (intro-fx.js)
   للإزالة الكاملة: احذف سطري intro-fx.css و intro-fx.js من index.html
   ========================================================================== */

/* صفحة التسجيل «بعيدة» ومخفية وقت المقدمة، وبالأخير ترجع بنعومة */
html.intro-on main.auth:not(.pending-page) .auth-shell {
  /* حركة الدخول العادية (rise) تثبّت الصفحة ظاهرة، فنوقفها وقت المقدمة */
  animation: none !important;
  opacity: 0; transform: scale(.82) translateY(30px); filter: blur(6px);
}
html.intro-on.intro-measure main.auth:not(.pending-page) .auth-shell { transform: none; filter: none; }
/* وقت البناء: القائمة تبين تدريجياً حسب البارتكلز */
html.intro-on.intro-fill main.auth:not(.pending-page) .auth-shell { opacity: 1; transform: none; filter: none; }
html.intro-on.intro-reveal main.auth:not(.pending-page) .auth-shell {
  opacity: 1; transition: opacity .6s ease, filter .6s ease;
}

.intro-fx {
  position: fixed; inset: 0; z-index: 2000; overflow: hidden;
  background: #030303; transition: background-color .7s ease, opacity .6s ease;
  display: grid; place-items: center;
}
.intro-fx.ix-clear { background-color: rgba(3, 3, 3, .1); }
.intro-fx.ix-out { opacity: 0; pointer-events: none; }
.ix-canvas, .ix-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.ix-stage { position: relative; width: min(42vw, 220px); aspect-ratio: 1; display: grid; place-items: center; }
.ix-eye { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; opacity: 0; }
.ix-glow {
  position: absolute; inset: -30%; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 69, 80, .42), rgba(255, 69, 80, .08) 40%, transparent 62%);
}
.ix-ring-wave {
  position: absolute; inset: 30%; border-radius: 50%; opacity: 0;
  box-shadow: 0 0 0 2px rgba(255, 69, 80, .9), 0 0 30px rgba(255, 69, 80, .6), inset 0 0 20px rgba(255, 69, 80, .5);
}

.ix-hex { fill: none; stroke: #FF4550; stroke-width: 3.2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ix-hexfill { fill: #1A0709; }
.ix-white { fill: #0B0B0D; }
.ix-lid { fill: none; stroke: #F3EEEE; stroke-width: 2.6; stroke-linejoin: round; }
.ix-iris-c { fill: #D42A33; }
.ix-ring { fill: none; stroke: #FF7A82; stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.ix-pupil { fill: #0B0B0D; }
.ix-glint { fill: #F3EEEE; }
.ix-ball { transform-box: view-box; transform-origin: 50px 50px; }
.ix-crease { fill: none; stroke: #FF4550; stroke-width: 2.4; stroke-linecap: round; opacity: 0; }

/* وميض الانفجار */
.intro-fx.ix-flash::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 220, 222, .55), rgba(255, 69, 80, .25) 35%, transparent 70%);
  animation: ix-flash .45s ease-out forwards;
}
@keyframes ix-flash { from { opacity: 1; } to { opacity: 0; } }

/* العنصر يتوهج لمن تكتمل بارتكلزه */
.ix-wet {
  box-shadow: 0 0 0 1px rgba(255, 69, 80, .95), 0 0 20px -2px rgba(255, 69, 80, .85) !important;
  transition: box-shadow .65s ease !important;
}

.ix-caption { position: absolute; bottom: 18%; margin: 0; color: #A69D9E; font-size: .9rem; }
.ix-skip {
  position: absolute; bottom: 24px; inset-inline-end: 24px; z-index: 2;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .06); color: #D8D2D2; font: inherit; font-size: .9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 69, 80, .35);
}
.ix-skip:hover { background: rgba(255, 69, 80, .15); color: #fff; }
.ix-skip:focus-visible { outline: 2px solid #FF4550; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .intro-fx { display: none; }
  html.intro-on main.auth .auth-shell { opacity: 1 !important; transform: none !important; filter: none !important; }
}
