/* ============================================================
   SPLASH SCREEN — boot & install splash
   ============================================================ */

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100dvh;
  padding: 32px 24px;
  background-color: #fde8bd;
  color: var(--text-color);
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

#splash-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: none;
  pointer-events: none;
}

#splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: relative;
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: none;
}

.splash-logo {
  width: clamp(96px, 24vw, 112px);
  height: clamp(96px, 24vw, 112px);
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(61, 61, 61, 0.14);
}

.splash-title {
  margin: 0;
  color: var(--text-color);
  font-size: clamp(1.85rem, 8vw, 2.35rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.splash-tagline,
.splash-subtitle,
.splash-progress {
  animation: splash-detail-in 0.42s ease 0.12s both;
}

.splash-tagline {
  margin: 14px 0 8px;
  color: var(--text-color);
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

.splash-subtitle {
  margin: 0;
  max-width: 280px;
  color: var(--secondary-color);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
}

.splash-progress {
  width: 112px;
  height: 3px;
  margin-top: 26px;
  border-radius: 999px;
  background-color: var(--accent-soft-color);
  overflow: hidden;
}

.splash-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: var(--primary-color);
  transform-origin: left center;
  animation: splash-progress 3s ease-out both;
}

.splash-progress.installing span {
  width: 46%;
  transform-origin: center;
  animation: splash-install-progress 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.splash-install-note {
  min-height: 1.2em;
  margin: 14px 0 0;
  color: var(--secondary-color);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}

.splash-install-note.hidden { display: none; }

@keyframes splash-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes splash-progress {
  from { transform: scaleX(0.08); }
  to   { transform: scaleX(1); }
}

@keyframes splash-detail-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes splash-install-progress {
  0%   { transform: translateX(-120%); }
  55%  { transform: translateX(75%); }
  100% { transform: translateX(220%); }
}

@media (max-width: 380px) {
  #splash-screen { padding-top: 48px; }
  .splash-logo   { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-content,
  .splash-progress span { animation: none; }
  #splash-screen        { transition: none; }
}
