/* Pantalla de carga de Gpulse: Gpulse.org → Geopulse.org (la «o» es el globo) → pam-pam → Gpulse.org · by Oen Systems */
#loader {
  position: fixed; inset: 0; z-index: 100; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 50%, #1a2130 0%, #111316 62%);
  font-family: Inter, system-ui, sans-serif; color: #fff;
  transition: opacity .5s ease;
}
#loader.out { opacity: 0; pointer-events: none; }
#ld-stars { position: absolute; inset: 0; width: 100%; height: 100%; }

/* La Tierra asomando por abajo como un horizonte */
.ld-earth {
  position: absolute; left: 50%; top: 66vh; width: 160vw; aspect-ratio: 1; border-radius: 50%;
  transform: translateX(-50%);
  background: #0c1a2c url("../assets/earth-1024.jpg") 0 36% / auto 230% repeat-x;   /* asoman latitudes medias */
  image-rendering: auto; filter: saturate(.9) brightness(.95);
  box-shadow: inset 0 0 12vw rgba(0, 0, 0, .85), 0 0 4vw rgba(122, 167, 255, .55), 0 0 1.2vw rgba(122, 167, 255, .9);
  opacity: .9;
}
.ld-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 60% at 50% 100%, rgba(255, 131, 122, 1) 0%, rgba(0, 0, 0, 0) 55%); opacity: 0; }
.ld-fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(17, 19, 22, 0) 70%, rgba(17, 19, 22, .55) 100%); }

/* Logo */
.ld-center { position: relative; display: flex; flex-direction: column; align-items: center; }
.ld-word {
  display: flex; align-items: baseline; font-size: min(12vw, 190px); font-weight: 500; letter-spacing: -.035em; line-height: 1;
  white-space: nowrap; will-change: transform, opacity;
}
.ld-open { display: inline-flex; align-items: baseline; overflow: hidden; width: 0; }
.ld-e { flex: none; display: inline-block; }
.ld-o { flex: none; position: relative; display: inline-block; width: .67em; height: .57em; vertical-align: baseline; }
.ld-globe {
  position: absolute; left: .05em; bottom: 0; width: .57em; height: .57em; border-radius: 50%; overflow: hidden;
  background: #0c1a2c url("../assets/earth-1024.jpg") 0 40% / auto 100% repeat-x;
  box-shadow: inset -.07em -.05em .12em rgba(0, 0, 0, .75), inset .02em .02em .05em rgba(255, 255, 255, .2), 0 0 0 .012em rgba(122, 167, 255, .9), 0 0 .08em rgba(122, 167, 255, .6);
}
.ld-halo { position: absolute; left: 50%; bottom: .285em; width: .9em; height: .9em; border-radius: 50%; transform: translate(-50%, 50%);
  background: radial-gradient(circle, rgba(255, 131, 122, 1) 0%, rgba(255, 131, 122, 0) 62%); opacity: .25; z-index: -1; }
.ld-rings { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.ld-ring { position: absolute; border-radius: 50%; border: 6px solid #FF837A; opacity: 0; transform: translate(-50%, -50%); }
.ld-by { margin-top: .9em; font-size: calc(min(12vw, 190px) * .3); font-weight: 400; color: rgba(255, 255, 255, .72); letter-spacing: .01em; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .ld-open { display: none; }
}

/* «Cargando» bajo el logo; se cambia por «by Oen Systems» al terminar */
.ld-foot { position: relative; margin-top: .9em; font-size: calc(min(12vw, 190px) * .3); height: 1.4em; width: 100%; display: grid; place-items: start center; }
.ld-foot .ld-by { margin-top: 0; grid-area: 1 / 1; }
.ld-status { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: .35em; transition: opacity .3s; }
.ld-status b { font-weight: 500; font-size: .62em; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.ld-status b i { font-style: normal; animation: ld-dot 1.2s infinite; opacity: .2; }
.ld-status b i:nth-child(2) { animation-delay: .2s; } .ld-status b i:nth-child(3) { animation-delay: .4s; }
@keyframes ld-dot { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.ld-status span { font-size: .42em; color: rgba(255, 255, 255, .5); letter-spacing: .02em; }
#loader.closing .ld-status { opacity: 0; }
@media (max-width: 720px) { .ld-foot { font-size: 5vw; } }

/* Consola de arranque (sobria, tipo arranque de sistema) */
.ld-log {
  position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); width: min(560px, 92vw);
  font: 400 11.5px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: rgba(255, 255, 255, .55);
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 7.5em; z-index: 2;
}
.ld-line { display: flex; align-items: baseline; gap: .6em; white-space: nowrap; overflow: hidden; animation: ld-in .25s ease-out; }
.ld-line span { color: rgba(255, 255, 255, .32); flex: none; }
.ld-line i { flex: 1; min-width: 1em; border-bottom: 1px dotted rgba(255, 255, 255, .18); transform: translateY(-.3em); }
.ld-line b { flex: none; font-weight: 600; letter-spacing: .05em; }
.ld-line b.ok { color: #3BA776; } .ld-line b.ko { color: #E8B86B; }
.ld-line em { font-style: normal; margin-left: auto; color: rgba(255, 255, 255, .32); }
@keyframes ld-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#loader.closing .ld-log { opacity: .35; transition: opacity .4s; }
@media (max-width: 720px) { .ld-log { font-size: 10px; bottom: 5vh; } }

/* ===== Versión fluida: todo lo que se mueve va por la tarjeta gráfica (transform/opacity) ===== */
.ld-earth { background: #0c1a2c; overflow: hidden; filter: none;
  box-shadow: inset 0 0 12vw rgba(0, 0, 0, .85), 0 0 4vw rgba(122, 167, 255, .55), 0 0 1.2vw rgba(122, 167, 255, .9); }
.ld-tex { position: absolute; left: 0; top: -46.8%; height: 230%; width: 920%;
  background: url("../assets/earth-1024.jpg") 0 0 / auto 100% repeat-x; will-change: transform;
  animation: ld-spin-earth 240s linear infinite; }
@keyframes ld-spin-earth { to { transform: translateX(-50%); } }
.ld-globe { background: #0c1a2c; }
.ld-gtex { position: absolute; left: 0; top: 0; height: 100%; width: 400%;
  background: url("../assets/earth-1024.jpg") 0 0 / auto 100% repeat-x; will-change: transform;
  animation: ld-spin-globe 9s linear infinite; }
@keyframes ld-spin-globe { to { transform: translateX(-50%); } }
.ld-globe::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset -.07em -.05em .12em rgba(0, 0, 0, .75), inset .02em .02em .05em rgba(255, 255, 255, .2); }
.ld-glow, .ld-halo, .ld-word { will-change: opacity, transform; }
/* Ondas coral: nacen en el centro del globo y crecen escalando */
.ld-rings { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; font-size: min(12vw, 190px); }
.ld-ring { position: absolute; left: 0; top: 0; width: 5.2em; height: 5.2em; border: .03em solid #FF837A; border-radius: 50%;
  transform: translate(-50%, -50%) scale(.12); opacity: 0; will-change: transform, opacity;
  animation: ld-ring .9s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes ld-ring { 0% { transform: translate(-50%, -50%) scale(.12); opacity: .85; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld-tex, .ld-gtex { animation: none; } }
