/* Pantalla de carga (splash) · solo al entrar por primera vez a la web o al recargar la página (js/splash.js).
   Secuencia: logos de marcas en blanco (destello) → logo de Euro Truck Simulator 2 → "Bienvenido a AteriaAS" → cortina que sube. */
html.splash-on { overflow: hidden; }

.splash {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; overflow: hidden;
  background: #050605; color: #fff; cursor: pointer;
  clip-path: inset(0 0 0 0); transition: clip-path .85s cubic-bezier(.76, 0, .24, 1);
}
.splash.is-leaving { clip-path: inset(0 0 100% 0); pointer-events: none; }

.splash__stage { position: absolute; inset: 0; display: grid; place-items: center; }

/* Logos: aparecen de golpe (destello) y se reemplazan uno a otro */
.splash__logo { position: absolute; max-width: 70vw; max-height: 26vh; object-fit: contain; opacity: 0; user-select: none; -webkit-user-drag: none; }
.splash__logo.is-on { opacity: 1; animation: splash-pop .22s cubic-bezier(.2, .8, .2, 1); }
.splash__logo.is-hero.is-on { animation: splash-hero .7s cubic-bezier(.2, .8, .2, 1); }
.splash__logo.is-out { opacity: 0; transition: opacity .3s ease, transform .3s ease; transform: translateY(-14px); }
@keyframes splash-pop { from { transform: scale(.9); } to { transform: scale(1); } }
@keyframes splash-hero { from { transform: scale(.82); filter: blur(6px); opacity: 0; } to { transform: scale(1); filter: blur(0); opacity: 1; } }

/* Bienvenida: cada palabra sube desde una máscara */
.splash__welcome {
  position: absolute; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .32em; margin: 0; padding: 0 1.25rem; max-width: 92vw;
  font-family: var(--font-display, "Anton", Impact, sans-serif); font-weight: 400; line-height: 1.1;
  font-size: clamp(1.8rem, 6.2vw, 4.2rem); text-align: center;
}
.splash__word { display: inline-block; overflow: hidden; padding-block: .06em; }
.splash__word > span { display: inline-block; transform: translateY(110%); transition: transform .75s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 110ms); }
.splash__welcome.is-on .splash__word > span { transform: translateY(0); }
.splash__word--brand { color: var(--lime, #b7e31b); }
.splash__break { flex-basis: 100%; height: 0; }

/* Contador y barra de progreso */
.splash__count { position: absolute; left: clamp(1rem, 3vw, 2rem); bottom: 1.6rem; font: 700 .78rem/1 var(--font, system-ui); letter-spacing: .12em; color: rgba(255, 255, 255, .55); direction: ltr; font-variant-numeric: tabular-nums; }
.splash__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); direction: ltr; }
.splash__bar > i { display: block; height: 100%; width: 100%; background: var(--lime, #b7e31b); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s linear; }

@media (prefers-reduced-motion: reduce) { .splash { display: none; } html.splash-on { overflow: auto; } }
