/* Earliest paint — pure black before Next CSS chunk arrives.
   Splash overlay rules are scoped to #vibeup-boot-splash so app CSS cannot
   move/resize the logo. Do not fold this file into globals.css. */
@font-face {
  font-family: VibeUpSplash;
  src: url(/splash/montserrat-700.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

html,
body {
  background: #000000 !important;
  background-color: #000000 !important;
  /* `only dark`: iOS Light Mode otherwise paints a white WKWebView canvas
     between the native Home Screen launch image and the HTML splash. */
  color-scheme: only dark !important;
}

/* Explore stays hidden until explicitly ready (under the black plate). */
html:not(.vibeup-app-ready) #vibeup-app-shell {
  visibility: hidden !important;
}

html.vibeup-splash-skip #vibeup-boot-splash {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Demote only with this class — never tie it to splash-skip (white flash). */
html.vibeup-paint-demoted #vibeup-critical-paint {
  z-index: -1 !important;
  pointer-events: none !important;
}

#vibeup-critical-paint {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9990 !important;
  background: #000000 !important;
  background-color: #000000 !important;
  pointer-events: none !important;
}

#vibeup-boot-splash {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  isolation: isolate !important;
  background: #000000 !important;
  background-color: #000000 !important;
  pointer-events: auto !important;
  display: block !important;
  opacity: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  animation: none !important;
  filter: none !important;
  transition: none !important;
}

#vibeup-boot-splash.vibeup-splash--exit {
  opacity: 1 !important;
  pointer-events: none !important;
  transition: none !important;
}

#vibeup-boot-splash.vibeup-splash--exit .vibeup-splash__stage {
  opacity: 0 !important;
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Geometry must match iOS apple-touch-startup-image: 50% - 12vh - 64px. */
#vibeup-boot-splash .vibeup-splash__stage {
  position: absolute !important;
  top: calc(50% - 12vh - 64px) !important;
  left: calc(50% - 64px) !important;
  width: 128px !important;
  height: 128px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  transform: none !important;
  animation: none !important;
}

#vibeup-boot-splash .vibeup-splash__logo {
  display: block !important;
  box-sizing: border-box !important;
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
  min-height: 128px !important;
  max-width: 128px !important;
  max-height: 128px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  background-image: url(/vibeup-splash-logo-inline.png);
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 128px 128px !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  filter: none !important;
}

#vibeup-boot-splash .vibeup-splash__tagline {
  position: absolute;
  top: 100%;
  left: 50%;
  display: block;
  width: max-content;
  margin: 1.15rem 0 0;
  padding: 0 0.25rem;
  max-width: calc(100vw - 0.75rem);
  font-family: VibeUpSplash, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.2rem, 5.8vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.28;
  white-space: nowrap;
  color: #fff;
  text-align: center;
  opacity: 1;
  transform: translateX(-50%);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  #vibeup-boot-splash.vibeup-splash--exit .vibeup-splash__stage {
    transition: none !important;
  }
}

#vibeup-app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  background-color: #000000;
}
