/*
 * SceneItAll web splash screen.
 *
 * Purpose: Show an immediate branded loading screen while Flutter downloads,
 * initializes, Clerk loads, and the first real app frame paints. Hides itself
 * when Flutter calls window.hideSplash() from Dart.
 *
 * Notes:
 *  - No JavaScript is required for the initial render; this keeps the splash
 *    visible even if script loading stalls briefly.
 *  - Background is always white, independent of system/browser theme, so
 *    there's no dark flash before Flutter's theme takes over.
 *  - The inline canonical logo is the no-script and reduced-motion fallback.
 *  - Logo and message animations respect prefers-reduced-motion.
 */

:root {
  --sceneitall-rose: #ff204e;
  --sceneitall-purple: #6e0e7f;
  --fold-duration: 6.4s;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #ffffff;
}

#flutter-splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  transition: opacity 500ms ease-out, visibility 500ms ease-out;
}

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

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px;
  max-width: 320px;
}

.splash-logo {
  display: block;
  width: 120px;
  height: 120px;
  margin-bottom: 28px;
}

.splash-logo__faces {
  display: none;
}

.splash-animation-ready .splash-logo__faces {
  display: inline;
}

.splash-logo__canonical {
  transition: none;
}

.splash-animation-ready .splash-logo__canonical {
  opacity: 0;
}

.splash-logo__face {
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  will-change: opacity;
}

.splash-logo__folded-stack {
  transform-box: fill-box;
  transform-origin: center;
  will-change: opacity, transform;
}

.splash-logo__folded-stack path {
  stroke: rgb(73 8 86 / 28%);
  stroke-width: 0.15;
  vector-effect: non-scaling-stroke;
}

.splash-logo__folded-stack--top {
  fill: #ff5274;
}

.splash-logo__folded-stack--right {
  fill: var(--sceneitall-rose);
}

.splash-logo__folded-stack--bottom {
  fill: #8b1498;
}

.splash-logo__folded-stack--left {
  fill: var(--sceneitall-purple);
}

.splash-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
}

.splash-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #5a5a5a;
  transition: opacity 180ms ease, transform 180ms ease;
}

.splash-subtitle.splash-message-changing {
  opacity: 0;
  transform: translateY(4px);
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo__faces {
    display: none;
  }

  .splash-logo__canonical {
    opacity: 1;
  }

  #flutter-splash,
  .splash-subtitle {
    transition: none;
  }
}
