/* ============================================================
   SPLASH SCREEN
   - Fondo azul #0000fc — se levanta como cortina al salir
   - Logo SVG real centrado en verde #47ff64
   - Al salir: el logo vuela desde el centro hasta el header
   ============================================================ */

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  isolation: isolate;
}

/* ---- Capa de fondo (sube al salir) ---- */
#splash-bg {
  position: absolute;
  inset: 0;
  background: var(--splash-bg, #0000fc);
  z-index: 0;
}

#splash-bg.splash-slide-up {
  animation: splashCurtainUp 0.85s cubic-bezier(0.76, 0, 0.24, 1) both;
}

@keyframes splashCurtainUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-100%); }
}


/* ---- Tagline "Studio" — dentro de #splash-bg, sube con la cortina ---- */
#sp-tagline {
  position: absolute;
  top: calc(50% + 46.6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.sp-tl-inner {
  display: block;
  font-family: "Franklin Gothic Medium", Arial, sans-serif;
  font-size: clamp(11px, 1.4vw, 14px);
  color: var(--splash-fg-40, rgba(71, 255, 100, 0.4));
  letter-spacing: 0.45em;
  text-transform: uppercase;
  transform: translateY(110%);
  animation: spSlideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes spSlideUp {
  to { transform: translateY(0); }
}

/* ---- Barra de progreso ---- */
.sp-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px 20px;
  opacity: 0;
  animation: spFootFadeIn 0.4s ease 0.7s both;
}

@keyframes spFootFadeIn {
  to { opacity: 1; }
}

.sp-track {
  flex: 1;
  height: 1px;
  background: var(--splash-fg-15, rgba(71, 255, 100, 0.15));
  position: relative;
  overflow: hidden;
}

.sp-fill {
  position: absolute;
  inset: 0;
  background: var(--splash-fg, #47ff64);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease-out;
  box-shadow: 0 0 6px var(--splash-fg-shadow, rgba(71, 255, 100, 0.5));
}

.sp-pct {
  font-family: "Franklin Gothic Medium", monospace, sans-serif;
  font-size: 11px;
  color: var(--splash-fg-35, rgba(71, 255, 100, 0.35));
  letter-spacing: 0.06em;
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Logo real centrado durante el splash */
body.splash-active .center-logo {
  transform: translateY(calc(50vh - 48.6px));
  animation: spLogoReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes spLogoReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.splash-active .logo {
  color: var(--splash-fg, #47ff64);
}


/* ============================================================
   CAROUSEL PAINT OPTIMIZATIONS
   ============================================================ */

.carousel {
  scroll-behavior: smooth;
  -webkit-scroll-behavior: smooth;
}

.carousel img,
.carousel video {
  will-change: auto;
  contain: layout;
}

.project-grid-item {
  contain: layout style paint;
}

.hero-section {
  contain: layout style paint;
}

.hero-background {
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
