/* شاشة افتتاح منصة تيرا — الشاشة الوحيدة للتحميل في الموقع والبوابة. */
@font-face {
  font-family: Alexandria;
  src: url("/platform/fonts/Alexandria.ttf") format("truetype");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Alexandria;
  src: url("/platform/fonts/Alexandria-Bold.ttf") format("truetype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
.opening {
  position: fixed; inset: 0; z-index: 240; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; padding: 24px;
  overflow: hidden; background: #0A1F44; color: #FFC861;
}
.opening-glow, .opening-ring { position: absolute; pointer-events: none; }
.opening-glow {
  width: min(46vw, 520px); height: min(46vw, 520px); border-radius: 50%; filter: blur(8px);
}
.opening-glow-a {
  left: 6%; top: 8%;
  background: radial-gradient(circle, rgba(10, 165, 173, .62), transparent 68%);
  animation: opening-drift-a 7s ease-in-out infinite;
}
.opening-glow-b {
  right: 4%; bottom: 6%;
  background: radial-gradient(circle, rgba(240, 150, 42, .48), transparent 70%);
  animation: opening-drift-b 7s ease-in-out infinite;
}
.opening-ring {
  left: 50%; top: 42%; width: min(280px, 52vw); height: min(280px, 52vw);
  border-radius: 50%; border: 1px solid rgba(255, 200, 97, .62);
  box-shadow: 0 0 40px rgba(10, 165, 173, .28);
  animation: opening-pulse 7s ease-in-out infinite;
}
.opening img {
  position: relative; z-index: 1; height: clamp(72px, 12vw, 120px); width: auto;
  animation: opening-float 7s ease-in-out infinite;
}
.opening > p {
  position: relative; z-index: 1; margin: 0; font-family: Alexandria, sans-serif; font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2.4rem); line-height: 1.5; text-align: center; color: #FFC861;
  background: linear-gradient(100deg, #FFC861 0%, #fff6df 42%, #FFC861 78%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: opening-rise 7s ease-in-out infinite, opening-shimmer 7s linear infinite;
}
.opening button { display: none; }
.opening.is-done, #splash-screen.splash-hide {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s ease, visibility .45s ease;
}
.page-loader { z-index: 250; }
.opening-wait {
  position: absolute; z-index: 2; inset-inline: 0; bottom: max(32px, env(safe-area-inset-bottom));
  display: grid; justify-items: center; gap: 14px; padding-inline: 24px;
  animation: opening-wait-in .7s ease .15s both;
}
.opening-please {
  margin: 0; font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 500; font-size: 1.05rem; letter-spacing: .04em; color: #fff;
  text-shadow: none;
}
/* الغطاء يثبت فوق الصفحة دون قفل تمرير الوثيقة، فيبقى موضع التحديث كما كان. */
.opening-track {
  position: relative; width: min(16rem, 72vw); display: grid; justify-items: center; gap: 12px;
}
.opening-rail {
  position: relative; display: block; width: 100%; height: 2px; overflow: hidden;
  border-radius: 999px; background: rgba(255, 255, 255, .28); transform: none; box-shadow: none;
}
.opening-cursor {
  position: absolute; top: 0; bottom: 0; width: 32%; border-radius: 999px; background: #fff;
  animation: opening-cursor 1.5s linear infinite;
}
.opening-dots { display: inline-flex; align-items: center; gap: 8px; }
.opening-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: 0;
  animation: opening-dot 1.2s ease infinite;
}
.opening-dots i:nth-child(2) { animation-delay: .2s; }
.opening-dots i:nth-child(3) { animation-delay: .4s; }
.opening-status {
  margin: 0; max-width: 26rem; text-align: center;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: .85rem; font-weight: 500; line-height: 1.7; color: #C9D6EC;
}
.opening-status:empty { display: none; }
html body #boot.opening #boot-text.opening-status {
  color: #C9D6EC; -webkit-text-fill-color: #C9D6EC; background: none;
  font-size: .85rem; font-weight: 500; animation: none;
}
@keyframes opening-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12vw, 8vh, 0) scale(1.16); }
}
@keyframes opening-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-10vw, -7vh, 0) scale(.88); }
}
@keyframes opening-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.84); opacity: .32; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: .92; }
}
@keyframes opening-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes opening-rise {
  0%, 100% { transform: translateY(8px); }
  50% { transform: translateY(-6px); }
}
@keyframes opening-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
@keyframes opening-wait-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes opening-cursor {
  0% { inset-inline-start: -32%; }
  100% { inset-inline-start: 100%; }
}
@keyframes opening-dot {
  0%, 100% { opacity: 0; }
  35% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .opening-glow, .opening-ring, .opening img, .opening > p, .opening-wait, .opening-cursor, .opening-dots i { animation: none; }
  .opening-cursor { inset-inline-start: 34%; }
  .opening-dots i { opacity: 1; }
}
