/* Modo carga estilo app: esqueletos gris/negro con rayas blancas que barren (sin círculos) */
:root { --ld-accent: var(--accent, #f47521); --sk-base: #17171c; --sk-mid: #22222a; }

/* Dibujo del esqueleto de página: portada + títulos + filas de carteles (solo gradientes, sin JS) */
.inka-skelbg, html:not(.inka-ready) body::before, #inka-spin {
  background-color: #0b0b0d;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--sk-mid), var(--sk-mid)), linear-gradient(var(--sk-base), var(--sk-base)), linear-gradient(var(--sk-base), var(--sk-base)),
    linear-gradient(var(--sk-mid), var(--sk-mid)), linear-gradient(var(--sk-mid), var(--sk-mid)), linear-gradient(var(--sk-mid), var(--sk-mid)),
    linear-gradient(var(--sk-base), var(--sk-base)),
    linear-gradient(var(--sk-mid), var(--sk-mid)), linear-gradient(var(--sk-mid), var(--sk-mid)), linear-gradient(var(--sk-mid), var(--sk-mid));
  background-size:
    100% 38vh, 42% 16px, 30% 22px,
    28vw 42vw, 28vw 42vw, 28vw 42vw,
    36% 16px,
    28vw 42vw, 28vw 42vw, 28vw 42vw;
  background-position:
    0 0, 20px calc(38vh + 24px), 20px calc(38vh + 54px),
    20px calc(38vh + 84px), calc(20px + 30vw) calc(38vh + 84px), calc(20px + 60vw) calc(38vh + 84px),
    20px calc(38vh + 84px + 42vw + 24px),
    20px calc(38vh + 84px + 42vw + 54px), calc(20px + 30vw) calc(38vh + 84px + 42vw + 54px), calc(20px + 60vw) calc(38vh + 84px + 42vw + 54px);
}
@media (min-width: 800px) {
  .inka-skelbg, html:not(.inka-ready) body::before, #inka-spin { background-size: 100% 46vh, 22% 18px, 14% 24px, 12vw 18vw, 12vw 18vw, 12vw 18vw, 18% 18px, 12vw 18vw, 12vw 18vw, 12vw 18vw;
    background-position: 0 0, 48px calc(46vh + 24px), 48px calc(46vh + 54px), 48px calc(46vh + 90px), calc(48px + 13vw) calc(46vh + 90px), calc(48px + 26vw) calc(46vh + 90px),
      48px calc(46vh + 90px + 18vw + 24px), 48px calc(46vh + 90px + 18vw + 60px), calc(48px + 13vw) calc(46vh + 90px + 18vw + 60px), calc(48px + 26vw) calc(46vh + 90px + 18vw + 60px); }
}

/* 1) Pantalla de carga al abrir cada página (solo CSS: se quita sola aunque falle el JS) */
html:not(.inka-ready) body::before { content: ""; position: fixed; inset: 0; z-index: 99998; animation: ldHide .35s ease 6s forwards; }
/* raya blanca que barre todo el esqueleto */
html:not(.inka-ready) body::after, html.inka-nav-slow #inka-spin::after {
  content: ""; position: fixed; inset: 0; z-index: 99999; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.07) 44%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.07) 56%, transparent 62%) 0 0 / 250% 100%;
  animation: ldSweep 1.4s linear infinite, ldHide .35s ease 6s forwards;
}
html.inka-ready body::before { content: ""; position: fixed; inset: 0; z-index: 99998; background: #0b0b0d; pointer-events: none; animation: ldFade .3s ease forwards; }
@keyframes ldFade { to { opacity: 0; visibility: hidden; } }
@keyframes ldHide { to { opacity: 0; visibility: hidden; } }
@keyframes ldSweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* 2) Al cambiar de página: barra naranja arriba y, si tarda, esqueleto */
#inka-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--ld-accent); z-index: 100001; opacity: 0; pointer-events: none;
  box-shadow: 0 0 8px var(--ld-accent); transition: width .4s ease, opacity .2s; }
html.inka-nav #inka-bar { opacity: 1; width: 82%; transition: width 6s cubic-bezier(.1,.7,.2,1), opacity .2s; }
#inka-spin { position: fixed; inset: 0; z-index: 100000; display: none; pointer-events: none; }
html.inka-nav-slow #inka-spin { display: block; }

/* 3) Imágenes y fondos: esqueleto gris/negro con rayas blancas hasta que cargan */
img[data-ld] { opacity: 0; }
img[data-ld].ld-ok { opacity: 1; transition: opacity .4s ease; }
.inka-sk::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(105deg, transparent 36%, rgba(255,255,255,.06) 42%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.06) 58%, transparent 64%) 0 0 / 260% 100%,
    linear-gradient(160deg, #26262d, #0f0f13);
  animation: ldSweep 1.3s linear infinite; }
.inka-sk.ld-done::after { animation: none; opacity: 0; transition: opacity .4s; }

@media (prefers-reduced-motion: reduce) { .inka-sk::after, html:not(.inka-ready) body::after { animation-duration: 4s; } }

/* Video de portada: oculto hasta tener su primer fotograma (evita el cuadro gris con triángulo del WebView) */
video.vcover { opacity: 0; transition: opacity .4s ease; }
video.vcover.vc-on { opacity: 1; }
