/* ============================================================
   SPLASH — "Ignition Sequence" — PT. Visi Prima Utama (VPU)
   Runs once per browser session. Paired with js/splash.js.
   Reuses the design tokens defined in css/style.css.
   ============================================================ */

html.splash-active {
  overflow: hidden;
}

/* While the splash is up, keep above-the-fold .reveal content (the hero)
   pinned at its own natural pre-reveal state — even if IntersectionObserver
   has already silently marked it .is-visible behind the overlay — so it
   animates into place in sync with the splash fading out, not before. */
html.splash-active .reveal {
  opacity: 0 !important;
  transform: translateY(28px) scale(0.97) !important;
  filter: blur(6px) !important;
  transition: none !important;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.splash-screen.is-hiding {
  opacity: 0;
  pointer-events: none;
}

/* ---- Mesh: three soft color blobs that bloom outward from center ---- */
.splash-mesh {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  transition: transform 0.4s ease-out;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 1.1s ease, transform 1.4s var(--ease-smooth);
  will-change: opacity, transform;
}

.mesh-blob-navy {
  width: 560px;
  height: 560px;
  top: 50%;
  left: 50%;
  margin: -280px 0 0 -280px;
  background: radial-gradient(circle, rgba(10, 42, 87, 0.30), transparent 70%);
}

.mesh-blob-gold {
  width: 420px;
  height: 420px;
  top: 36%;
  left: 68%;
  margin: -210px 0 0 -210px;
  background: radial-gradient(circle, rgba(224, 165, 38, 0.26), transparent 70%);
}

.mesh-blob-teal {
  width: 420px;
  height: 420px;
  top: 66%;
  left: 30%;
  margin: -210px 0 0 -210px;
  background: radial-gradient(circle, rgba(15, 163, 164, 0.26), transparent 70%);
}

.splash-screen.is-active .mesh-blob {
  opacity: 1;
  transform: scale(1);
}

/* ---- Logo + wordmark ---- */
.splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  text-align: center;
}

.splash-logo-wrap {
  position: relative;
}

.splash-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 165, 38, 0.35), transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.8s ease, transform 1s var(--ease-smooth);
  z-index: -1;
}

.splash-screen.is-active .splash-logo-wrap::after {
  opacity: 1;
  transform: scale(1.3);
}

.splash-logo {
  height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  filter: grayscale(1) opacity(0.5);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth), filter 0.9s var(--ease-smooth) 0.15s;
}

.splash-screen.is-active .splash-logo {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: grayscale(0) opacity(1);
}

.splash-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.01em;
  color: var(--navy-950);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-smooth) 0.35s, transform 0.6s var(--ease-smooth) 0.35s;
}

.splash-screen.is-active .splash-name {
  opacity: 1;
  transform: translateY(0);
}

.splash-tagline {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-600);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease-smooth) 0.5s, transform 0.6s var(--ease-smooth) 0.5s;
}

.splash-screen.is-active .splash-tagline {
  opacity: 1;
  transform: translateY(0);
}
