/* First-paint splash for the hamyar space web client. Plain CSS, no fonts or
   CDNs: it must paint before Flutter downloads anything. Backgrounds match the
   app's first screen (AppColors.lightSurfaceSubtle / AppColors.darkBg). */
:root { --hs-bg: #F8F8F8; --hs-fg: #4A453E; --hs-track: #E3DDD3; --hs-fill: #13467D; --hs-btn: #A66300; --hs-btn-fg: #FFFFFF; }
@media (prefers-color-scheme: dark) {
  :root { --hs-bg: #110F0D; --hs-fg: #CFC7BB; --hs-track: #393128; --hs-fill: #FBBF24; --hs-btn: #FBBF24; --hs-btn-fg: #110F0D; }
}
html, body { margin: 0; background: var(--hs-bg); }
.hs-splash {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 24px; box-sizing: border-box;
  background: var(--hs-bg); color: var(--hs-fg);
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, "Noto Sans Arabic", sans-serif;
  text-align: center; opacity: 1; transition: opacity 240ms ease-out;
}
.hs-splash.hs-done { opacity: 0; pointer-events: none; }
.hs-logo { display: block; width: min(300px, 72vw); height: auto; }
.hs-bar { position: relative; width: min(220px, 56vw); height: 4px; border-radius: 2px; background: var(--hs-track); overflow: hidden; }
.hs-bar::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  border-radius: 2px; background: var(--hs-fill);
  animation: hs-slide 1.4s ease-in-out infinite;
}
.hs-splash[dir="rtl"] .hs-bar::before { left: auto; right: 0; animation-name: hs-slide-rtl; }
@keyframes hs-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes hs-slide-rtl { 0% { transform: translateX(100%); } 100% { transform: translateX(-250%); } }
.hs-status { margin: 0; min-height: 1.5em; max-width: 32ch; }
.hs-reload {
  display: none; margin: 0; padding: 0 24px; min-height: 44px; min-width: 44px; border: 0; border-radius: 8px;
  background: var(--hs-btn); color: var(--hs-btn-fg);
  font: 600 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, sans-serif; cursor: pointer;
}
.hs-reload:focus-visible { outline: 3px solid var(--hs-fg); outline-offset: 3px; }
.hs-slow .hs-reload { display: inline-block; }
.hs-slow .hs-bar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hs-bar::before { animation: none; }
  .hs-splash { transition: none; }
}
