/* ============================================================
   opening-showcase.css — the cinematic image montage shown right
   after the native app-launch splash, before the existing Opening
   Screen. z-index above Creator Mode's own overlay (9999) so the
   in-dashboard Preview button can show the exact same experience
   without closing Creator Mode first.
   ============================================================ */

.opening-showcase-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #05020a;
  overflow: hidden;
  transition: opacity 0.45s ease;
}
.opening-showcase-overlay.showcase-fading-out { opacity: 0; pointer-events: none; }

.opening-showcase-stage { position: relative; width: 100%; height: 100%; }

.opening-showcase-layer {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.opening-showcase-layer.is-entering,
.opening-showcase-layer.is-leaving { opacity: 1; will-change: opacity, transform, filter; }
.opening-showcase-layer.is-entering { opacity: 1; }
.opening-showcase-layer.is-leaving { opacity: 0; }

.opening-showcase-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  background: #05020a; /* avoids a flash of empty space while a src swap decodes */
}

.opening-showcase-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 0 1.5rem calc(3rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: rgba(255,255,255,0.92);
  font-family: var(--font-body, 'Cormorant Garamond', serif);
  font-size: 1.15rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.5s ease;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 100%);
  padding-top: 3rem;
}
.opening-showcase-caption.visible { opacity: 1; }

.opening-showcase-skip {
  position: absolute; top: calc(1.25rem + env(safe-area-inset-top, 0px)); right: 1.25rem;
  z-index: 1;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---------------- transitions ----------------
   Every one of these is opacity/transform/filter only — GPU-friendly,
   no layout-triggering properties, no JS animation loop involved. */

/* fade / crossfade — the two layers naturally overlap during the
   swap since both stay in the DOM; the only difference between them
   is speed, so "crossfade" reads as a touch softer/slower. */
.transition-fade.is-entering,
.transition-fade.is-leaving { transition: opacity 0.4s ease; }

.transition-crossfade.is-entering,
.transition-crossfade.is-leaving { transition: opacity 0.9s ease; }

.transition-dissolve.is-entering,
.transition-dissolve.is-leaving { transition: opacity 0.8s ease, filter 0.8s ease; }
.transition-dissolve.is-leaving { filter: blur(6px); }

.transition-slide-left.is-entering,
.transition-slide-left.is-leaving { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.transition-slide-left { transform: translateX(0); }
.transition-slide-left.is-entering { animation: showcaseSlideInFromRight 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.transition-slide-left.is-leaving { transform: translateX(-100%); }

.transition-slide-right.is-entering,
.transition-slide-right.is-leaving { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.transition-slide-right.is-entering { animation: showcaseSlideInFromLeft 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.transition-slide-right.is-leaving { transform: translateX(100%); }

.transition-zoom-in.is-entering,
.transition-zoom-in.is-leaving { transition: opacity 0.6s ease, transform 0.6s ease; }
.transition-zoom-in.is-entering { animation: showcaseZoomIn 0.6s ease; }

.transition-zoom-out.is-entering,
.transition-zoom-out.is-leaving { transition: opacity 0.6s ease, transform 0.6s ease; }
.transition-zoom-out.is-entering { animation: showcaseZoomOut 0.6s ease; }

.transition-soft-blur.is-entering,
.transition-soft-blur.is-leaving { transition: opacity 0.7s ease, filter 0.7s ease; }
.transition-soft-blur.is-entering { animation: showcaseSoftBlurIn 0.7s ease; }

/* Ken Burns — the enter/exit crossfade is the same as plain fade; the
   slow pan/zoom runs on the <img> itself for the whole time it's on
   screen (duration set inline per-image via style.animationDuration,
   the same pattern the existing opening sequence uses for its
   progress-segment fill). */
.transition-ken-burns.is-entering,
.transition-ken-burns.is-leaving { transition: opacity 0.6s ease; }
.transition-ken-burns .opening-showcase-img { animation: showcaseKenBurns linear both; animation-play-state: paused; }
.transition-ken-burns.is-entering .opening-showcase-img { animation-play-state: running; }

.transition-none.is-entering,
.transition-none.is-leaving { transition: none; }

@keyframes showcaseSlideInFromRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes showcaseSlideInFromLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes showcaseZoomIn { from { transform: scale(1.18); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes showcaseZoomOut { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes showcaseSoftBlurIn { from { filter: blur(22px); opacity: 0; } to { filter: blur(0); opacity: 1; } }
@keyframes showcaseKenBurns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1.5%); } }

/* Respect reduced-motion regardless of the transition configured in
   Creator Mode — a plain, fairly quick fade replaces all of the
   above. opening-showcase.js also selects 'fade' up front for the
   same reason; this is the CSS-level guarantee in case that check
   is ever bypassed. */
@media (prefers-reduced-motion: reduce) {
  .opening-showcase-layer,
  .opening-showcase-layer.is-entering,
  .opening-showcase-layer.is-leaving {
    transition: opacity 0.3s ease !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .opening-showcase-img { animation: none !important; }
}

@media (min-width: 700px) {
  .opening-showcase-caption { font-size: 1.35rem; padding-bottom: 3.5rem; }
}
